What are arrival, burst, turnaround, waiting and response time in CPU scheduling?
EasyConceptCPU Scheduling
Answer
These terms measure how a process experiences the scheduler. Arrival time (AT) is when the process enters the ready queue, burst time (BT) is the CPU time it needs, and completion time (CT) is when it finishes.
- Turnaround time (TAT) = CT − AT: the total time from arrival to completion.
- Waiting time (WT) = TAT − BT: the time spent waiting in the ready queue, for a process that does no I/O.
- Response time (RT) = first time on the CPU − AT: what an interactive user notices.
- Throughput is the number of processes completed per unit of time, and CPU utilisation is the fraction of time the CPU is busy.
Example: with FCFS, P1 (AT 0, BT 4) runs from 0 to 4 and P2 (AT 1, BT 3) runs from 4 to 7.
| Process | AT | BT | CT | TAT | WT | RT |
|---|---|---|---|---|---|---|
| P1 | 0 | 4 | 4 | 4 − 0 = 4 | 4 − 4 = 0 | 0 |
| P2 | 1 | 3 | 7 | 7 − 1 = 6 | 6 − 3 = 3 | 4 − 1 = 3 |
Average TAT = (4 + 6) / 2 = 5 and average WT = (0 + 3) / 2 = 1.5. In a non-preemptive algorithm like this one, RT equals WT.