Operating System Architecture: Core Management Functions
Classified in Computers
Written on in
English with a size of 2.49 KB
Level 1: Processor Management
Objectives
- Share CPU between processes without blocking the system.
Functions
- Initial startup synchronization between processes.
- CPU switching.
- Memory management.
- Interrupt management.
Level 2: Memory Management
Functions
- Allocation and release of memory.
- Control of access violations.
Level 3: Process Management
Objectives
- High-level process management.
Functions
- Creation and destruction of processes.
- Message exchange between processes.
- Detention and booting of processes.
Level 4: Device Management
Objectives
- Manage I/O based on existing process devices.
Functions
- I/O creation.
- Allocation and release of I/O devices.
- I/O scheduling.
Level 5: Information Management
Objectives
- Manage logical namespace, storage, and information protection.
Functions
- Creation and destruction of files and directories.
- Opening and closing files.
- Reading and writing files.
- Access protection.
Program Execution and Process Lifecycle
When a program is executed, it is loaded into memory by the loader. The dispatcher prepares the execution:
- BCP Creation: Creates the Process Control Block.
- Identification: Assigns a PID and a base priority.
- Resource Allocation: Assigns all necessary resources (except CPU).
- System Integration: Inserts the process into the system process table and loads it into virtual memory.
- State Transition: Changes the state to 'ready' and inserts it into the ready queue.
The Scheduler
The scheduler decides which process to execute based on dynamic priorities. To prevent starvation of low-priority processes, the planner:
- Reprioritizes processes in the CPU queue.
- Selects the process with the highest priority.
- Updates the process status field to 'execution'.
- Calls the context switch routine.
Each process is assigned a number of quantums, which may be static or dynamic depending on priority. Upon completion, the process calls the interrupt manager. Major interruptions include execution time limits, I/O requests, or errors.