Process Scheduling
Table of Contents
1. Metrics for Scheduling
2. Multi-Level Feedback Queue
MLFQ wants to handle 2 problems without any knowledge of the processes:
- optimize turn-around time
- responsive to interactive user, thus optimizing response time
2.1. Algorithm
The algorithm are some rules to follow. MLFQ sets up several queues and assigns each queue with a priority and a predefined time slice, which tells how long each task in this queue runs on CPU.
- If task A has higher priority than task B, then OS runs task A
- If task A and B have same priority, then A and B runs in Round-Robin with the preset time slice.
- When a job enters the OS, it’s placed at the highest priority.
- Once a job has used up its time allocated (regardless of how many times it has given up the CPU), its priority is reduced.
- After some time period \(S\), move all jobs in the OS to the topmost queue.