Memory Allocation of a Process
202310082304
Status: #idea
Tags: OS
Memory Allocation of a Process

.data-> Initialised data.bss-> Uninitialised data (Block starting with symbol)
Note
Middle region has memory mapped for shared libraries.
Ex: When reading a file, a full block of data is read.
Info
Frame pointer -> Top of the frame
Stack pointer -> Points to last element in stack
Global pointer -> Points to the starting of global space
Attention

Attention
Stack grows down and heap grows up
Note
static data is global data.
Info
Heap grows up. Stack grows down.
Attention
PCB has a fixed size.
PID serves as the index in an array of PCBs
Dispatcher
- Notice how the dispatcher runs, every time there is a context switch
