Address Space and Process Control Block(PCB)
ππππ«ππ¬π¬ ππ©πππ: Every process running on our systems has memory allocated for its address space. Which includes: || ππ΅π’π€π¬ β ππ’π± β ππ¦π’π± β ππ’π΅π’ β ππ¦πΉπ΅|| β’ Stack: Contai...

Source: DEV Community
ππππ«ππ¬π¬ ππ©πππ: Every process running on our systems has memory allocated for its address space. Which includes: || ππ΅π’π€π¬ β ππ’π± β ππ¦π’π± β ππ’π΅π’ β ππ¦πΉπ΅|| β’ Stack: Contains function calls, return addresses, local variables etc. β’ Gap: That's just the empty space kept for the dynamic memory to grow. β’ Heap: Used for dynamic memory allocation like malloc(), calloc(). β’ Data: For const, global and static variables. β’ Text: The program code or program instructions. (Usually read-only) -These address spaces are separate for each process and they cannot access each others. OS manages the whole thing, if something wrong happens OS throws Segmentation Fault. -Address space is virtual. Which is mapped to physical memory by OS. πππ: In simple words, a Process Control Block is a data structure used by OS to manage processes. Itβs like an ID Card for processes. Which includes: β’ Process ID (PID): Unique id for the process. β’ Process State: New, Ready, Running, Waiting