Tutorial 4
1. Preemptive Priority Scheduling:
Five processes arrive with different priorities (lower number = higher
priority).
P1(AT=0, BT=14, Pr=4), P2(AT=1, BT=6, Pr=1), P3(AT=3, BT=8,
Pr=3), P4(AT=5, BT=10, Pr=2), P5(AT=7, BT=4, Pr=1).
Draw the Gantt chart
compute WT, TAT, RT
identify starvation interval
Re-schedule using aging to the process waiting longest (priority
improves by 1 after every 6 units of waiting).
2. A system has context switch overhead of 0.5 units. P1(AT=0, BT=12,
Priority=3). P2(AT=1, BT=5, Priority=1), P3(AT=2, BT=7, Priority=4),
P4(AT=4, BT=6, Priority=2).
Prepare Gantt Chart
Calculate CPU Utilization.
3. Time quantum is 4 in Round Robin scheduling.
P1(AT=0, BT=18), P2(AT=1, BT=7), P3(AT=2, BT=11), P4(AT=6, BT=5).
Draw the Gantt chart and compute all scheduling metrics.
4. Round Robin with Time quantum = 3.
P1(AT=0, BT=10), P2(AT=1, BT=6), P3(AT=2, BT=8).
schedule and analyze CPU utilization and throughput.
5. In Round Robin:
Time quantum = 2, context switch = 0.2 units. All processes arrive at time 0.
P1(9), P2(7), P3(5), P4(3), P5(1).
What would be the order of execution.
6. FCFS Scheduling and Convoy Effect:
P1(AT=0, BT=30), P2(AT=1, BT=2), P3(AT=2, BT=1), P4(AT=3, BT=4),
P5(AT=4, BT=3).
Analyze convoy effect and compare with SJF.
7. Non-Preemptive SJF Scheduling:
P1(AT=0, BT=9), P2(AT=2, BT=4), P3(AT=4, BT=1), P4(AT=6, BT=2).
Construct the schedule (Gantt Chart) and evaluate starvation risk and
optimality.
8. SRTF Scheduling:
P1(AT=0, BT=15), P2(AT=1, BT=6), P3(AT=2, BT=4), P4(AT=3, BT=2).
Draw the Gantt chart, count preemptions, and compute average waiting time.
9. HRRN Scheduling:
P1(AT=0, BT=8), P2(AT=1, BT=4), P3(AT=2, BT=2), P4(AT=3, BT=6).
Calculate response ratios at each decision point and compare with SJF.
10. Comparative Scheduling Proof Question:
Given identical arrival and burst distributions for multiple processes,
compare SRTF, RR, and HRRN in terms of average waiting time, worst-
case response time, and throughput. Justify mathematically.