Typical Elements of a Process Image in Operating Systems
A process image (or process control block) is the OS's complete representation of a running program. While implementations vary, these core components are nearly universal:
- Stack: Fixed-size memory blocks for function calls, local variables, return addresses—LIFO structure per thread.
- Heap: Variable-size memory segments for dynamic allocation (malloc/new), managed by runtime or OS.
- Text Segments (Code Segment): Program instructions—read-only, shareable across processes running the same executable.
- Data Segments: Program's working data—global/static variables, unique per process instance.
- Shared Memory Segments: Memory regions mapped into multiple processes for inter-process communication (IPC).
- Process Status Information: OS metadata for scheduling and swapping: PID, state (ready/running/blocked), priority, registers, program counter, memory maps, open file descriptors, signal handlers, accounting info.
Together, these elements let the OS suspend, resume, migrate, and isolate processes—creating the illusion of simultaneous execution on limited hardware.