Services Provided for Process Management by Operating Systems
-
Process Creation and Termination
- Definition: The OS handles the creation of new processes and the termination of existing ones.
- Functionality: Includes allocation of resources and initialization of process attributes.
-
Process Scheduling
- Definition: The OS determines the order and allocation of CPU time to processes.
- Functionality: Manages multiple processes by using various scheduling algorithms (e.g., FCFS, SJF, Round Robin).
-
Process State Management
- Definition: The OS tracks the state of each process (e.g., running, ready, waiting).
- Functionality: Maintains a process control block (PCB) that stores process state information.
-
Inter-Process Communication (IPC)
- Definition: Mechanisms that allow processes to communicate and synchronize with each other.
- Functionality: Includes methods such as message passing, shared memory, and semaphores.
-
Synchronization
- Definition: The OS provides mechanisms to ensure processes operate in a coordinated manner.
- Functionality: Prevents race conditions and manages access to shared resources (e.g., using locks or monitors).
-
Deadlock Detection and Recovery
- Definition: The OS detects and resolves deadlocks that can occur when processes wait indefinitely for resources.
- Functionality: Implements algorithms to identify deadlocks and may take actions like process termination or resource preemption.
-
Resource Allocation
- Definition: The OS allocates CPU, memory, and I/O devices to processes as needed.
- Functionality: Uses various strategies to manage resource requests and allocations efficiently.
-
Process Isolation
- Definition: The OS ensures that processes do not interfere with each other’s execution.
- Functionality: Implements memory protection and access controls to safeguard process memory spaces.
-
Process State Restoration
- Definition: The OS restores a process’s state when it is scheduled back to the CPU after being preempted.
- Functionality: Involves loading the process’s context from the PCB.