- 2068 Magh · 2+6 marks
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.
| Job | Burst Time | Arrival Time |
|---|---|---|
| 0 | 75 | 0 |
| 1 | 50 | 10 |
| 2 | 25 | 10 |
| 3 | 20 | 80 |
| 4 | 45 | 85 |
| 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
- CPU utilization: keep the CPU as busy as possible (about 40% to 90% in real systems).
- Throughput: number of processes completed per unit time.
- Turnaround time: time from submission to completion (waiting + running + I/O).
- Waiting time: total time spent waiting in the ready queue.
- Response time: time from submission until the first response is produced (important in interactive systems).
- 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)
| Process | Arrival | Burst | Completion | Turnaround | Waiting |
|---|---|---|---|---|---|
| J0 | 0 | 75 | 200 | 200 | 125 |
| J1 | 10 | 50 | 165 | 155 | 105 |
| J2 | 10 | 25 | 85 | 75 | 50 |
| J3 | 80 | 20 | 170 | 90 | 70 |
| J4 | 85 | 45 | 215 | 130 | 85 |
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)
Related questions
- Preemptive priority and SRTF Gantt · Operating System, chapter 2
- FCFS, SJF, Priority, RR Gantt; max AWT · Operating System, chapter 2
- FCFS, SJF, RR Gantt and turnaround · Operating System, chapter 2
- Real-time scheduling; two-processor numerical · Operating System, chapter 2
- RR, preemptive priority, preemptive SJF · Operating System, chapter 2
- HRRN and RR scheduling (q=4) · Operating System, chapter 2
- AVL tree for 10 20 30 50 45 40 8 5 3 · Data Structure and Algorithm, chapter 6
- Bezier points at u=0.25,0.5,0.75: (10,15)... · Computer Graphics, chapter 5 · asked 4×
- Bezier points at u=0.25,0.5,0.75: (2,10)... · Computer Graphics, chapter 5 · asked 2×
- Bezier points at u=0.25,0.5,0.75: (10,10)... · Computer Graphics, chapter 5 · asked 2×