Definition
Process Creation
Triggers
A process can be created for several reasons:
- System Initialisation: When the OS boots, several background processes (daemons) are started.
- User Login: When a user logs in (e.g., via shell or GUI), a session process is created.
- Execution of a User Command: Starting an application like a text processor or browser.
- Process Spawning: An existing process creates a new one to perform a sub-task (forming a Process Hierarchy).
Creation Steps
- Assign PID: The OS finds an available slot in the Process Table.
- Allocate Space: Memory segments (Text, Data, Stack) are allocated.
- Initialise PCB: The state is set to “New” or “Ready,” and registers are initialised.
- Linkage: The process is linked to its parent and admitted to the ready queue.