Definition
Process Table
The process table is a central data structure used by the operating system to keep track of all active processes. It is typically implemented as an array or linked list of entries, where each entry points to or contains a Process Control Block (PCB).
The operating system uses the process table to manage the lifecycle of processes, from their creation (adding an entry) to their termination (removing the entry).
Management
When a process is created (e.g., during login or shell command execution), the OS finds an available slot in the process table and initialises a new PCB.
- Indexing: The process ID (PID) often serves as the index into the process table for constant-time access.
- Hierarchy: The table allows the OS to track relationships between processes, such as parent-child hierarchies.
- Cleanup: When a process reaches the Exit state, its entry in the process table is removed after the OS protocols its final resource usage.