5.3 Process Management
This lesson explores how operating systems manage computer processes. It details the structural differences between programs and processes, process state transitions using a seven-state model, CPU interrupts, context switching, and the structure of the Process Control Block (PCB). It also compares long-term, medium-term, and short-term schedulers alongside preemptive and non-preemptive scheduling policies.
ප්රධාන සංකල්ප
- Process
- A program in execution, representing the active entity in a modern operating system.
- Interrupt
- An asynchronous event that alters the execution sequence of a process, often generated by I/O devices to signal completion.
- Seven-State Process Transition Diagram
- A state diagram showing how processes transition between seven states: New, Ready, Running, Blocked, Exit, Blocked/Suspended, and Ready/Suspended.
- Process Control Block (PCB)
- A data structure maintained by the operating system for each process, storing information like Process ID, Process State, Program Counter, CPU Registers, and I/O status.
- Context Switching
- The mechanism of saving the state of an executing process to its PCB and loading the saved state of another process from its PCB to allow CPU sharing.
- Long-term Scheduler (Job Scheduler)
- A scheduler that selects processes from the job pool and loads them into main memory (the ready queue), controlling the degree of multiprogramming.
- Short-term Scheduler (CPU Scheduler)
- The fastest scheduler, which selects which process from the ready queue in main memory should be allocated to the CPU next.
- Medium-term Scheduler
- A scheduler that swaps processes between main memory and secondary storage (virtual memory) to manage the degree of multiprogramming.
- Preemptive Scheduling
- A scheduling policy where an executing process can be interrupted and moved back to the ready state before it finishes its execution burst or requests I/O.
- Non-preemptive Scheduling
- A scheduling policy where an executing process retains control of the CPU until it terminates or voluntarily blocks for an I/O operation.
- Turnaround Time
- The total interval of time from the submission of a process to its completion.
- Throughput
- The number of processes completed by the processor per unit of time.
- Waiting Time
- The total amount of time a process spends waiting in the ready queue.
- Response Time
- The time from the submission of a request until the first response is produced.
MCQ කට්ටල
MCQ 12විභාගයේදී
- Distinguishing between a program and a process in structured questions.
- Drawing and labeling the 7-state process transition diagram.
- Explaining the components and role of the Process Control Block (PCB).
- Comparing Long-term, Medium-term, and Short-term schedulers.
- Calculating or defining process metrics (Turnaround time, Throughput, Waiting time, Response time).
- Contrasting preemptive and non-preemptive scheduling policies.
