Skip to main content

CPU criteria; RR Gantt and times

Short answer

Performance criteria: CPU utilization, throughput, turnaround, waiting, response time. With RR q=15, Gantt: J0 0-15, J1 15-30, J2 30-45, J0 45-60, J1 60-75, J2 75-85, J0 85-100, J1 100-115, J3 115-130, J4 130-145, J0 145-160, J1 160-165, J3 165-170, J4 170-185, J0 185-200, J4 200-215. Average waiting time 87, average turnaround time 130 (time units).

What are the performance criteria for CPU? Assume you have the following jobs to execute with one processor.

JobBurst TimeArrival Time
0750
15010
22510
32080
44585
Suppose a system uses round-robin scheduling with quantum of 15 sec.
a) Draw the Gantt chart
b) Find the average wait and turnaround time

Performance criteria for CPU scheduling

  1. CPU utilization: keep the CPU as busy as possible (about 40% to 90% in real systems).
  2. Throughput: number of processes completed per unit time.
  3. Turnaround time: time from submission to completion (waiting + running + I/O).
  4. Waiting time: total time spent waiting in the ready queue.
  5. Response time: time from submission until the first response is produced (important in interactive systems).
  6. Fairness and deadlines met (real-time) are further criteria.

We want to maximise CPU utilization and throughput, and minimise turnaround, waiting and response times.

Round robin, quantum = 15

Assumption: a newly arriving process enters the ready queue before a process whose quantum has just expired. At t = 10, J1 and J2 arrive together (J1 first). The CPU is never idle, because some job is always ready, so the schedule ends at the total burst time of 215.

a) Gantt chart

| J0 | J1 | J2 | J0 | J1 | J2 | J0 | J1 | J3 | J4 |
0    15   30   45   60   75   85   100  115  130  145
| J0 | J1 | J3 | J4 | J0 | J4 |
145  160  165  170  185  200  215

b) Times (Turnaround = Completion − Arrival, Waiting = Turnaround − Burst)

ProcessArrivalBurstCompletionTurnaroundWaiting
J0075200200125
J11050165155105
J21025857550
J380201709070
J4854521513085

Average waiting time = 435 / 5 = 87

Average turnaround time = 650 / 5 = 130

Answer: average waiting time = 87 and average turnaround time = 130 (time units).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Operating System chapter 2 questions →