What is CPU scheduling?
The process of selecting which ready process should be executed next by the CPU.
What is the CPU–I/O burst cycle?
A process alternates between CPU bursts (execution) and I/O bursts (waiting).
Why is CPU scheduling important?
To keep the CPU busy as much as possible, improving efficiency and responsiveness.
What is a CPU burst?
The time a process spends using the CPU for computation.
What is an I/O burst?
The time a process spends waiting for input/output operations to complete.
What happens when a running process requests I/O?
It moves from the running state to the waiting state, and the CPU is assigned to another process.
What are the three main types of schedulers?
Long-term (job), Short-term (CPU), and Medium-term (swap) schedulers.
What does the long-term scheduler do?
It controls how many programs are loaded into memory at onc
What does the short-term scheduler do?
Chooses which ready process runs next on the CPU.
What does the medium-term scheduler do?
Temporarily removes processes from memory (swapping) to reduce load.
What is a dispatcher?
A module that gives control of the CPU to the process selected by the short-term scheduler.
What are the dispatcher’s functions?
Performs context switching, switches to user mode, and jumps to the proper location in the user program.
What is dispatcher latency?
The time it takes the dispatcher to stop one process and start another.
What is a scheduling mechanism?
The low-level implementation of process selection and switching.
What is a scheduling policy?
The decision-making rule for choosing which process should run next.
What is preemptive scheduling?
The CPU can be taken away from a process before it finishes its burst.
What is non-preemptive scheduling?
Once a process gets the CPU, it cannot be taken away until it finishes or waits voluntarily.
List five scheduling criteria.
CPU utilization, Throughput, Turnaround time, Waiting time, and Response time.
What is CPU utilization?
The percentage of time the CPU is busy doing useful work.
What is throughput?
The number of processes completed per unit of time.
What is turnaround time?
The total time taken from process submission to completion.
What is waiting time?
The total time a process spends waiting in the ready queue.
What is response time?
The time from process submission until the first output or response.
What is FCFS scheduling?
First-Come, First-Served; processes are executed in the order they arrive.