2) The following processes are being scheduled using a preemptive, roundrobin sc
ID: 3602962 • Letter: 2
Question
2) The following processes are being scheduled using a preemptive, roundrobin scheduling algorithm. Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. In addition to the processes listed below, the system also has an idle task (which consumes no CPU resources and is identified as Pidle ). This task has priority 0 and is scheduled whenever the system has no other available processes to run. The length of a time quantum is 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue a. Show the scheduling order of the processes using a Gantt chart. b. What is the turnaround time for each process? c. What is the waiting time for each process? d. What is the CPU utilization rate? PriorityBurst-T-Arrival 15 20 Thread 0 P4 P5 P6 5 10 15 95 100Explanation / Answer
P1
P1
P2
P3
P2
P3
P4
P3
P4
P4
P5
P6
P5
10
15
20
30
40
50
55
65
70
80
85
95
100
105
110
B) Turnaround Time
P1 15
P2 30
P3 45
P4 30
P5 15
P6 5
C) Waiting Time
P1 0
P2 10
P3 25
P4 5
P5 5
P6 0
Average waiting time = ( 0 + 10 + 25 + 5 + 5 + 0 ) / 6 = 45 / 6 = 7.5
D) CPU Utilization Time : 95 + 12 CS (CS – Context Switching) – 107/110*100 = 97.27%
Without CS – 95 / 110 * 100 = 86.36 %
- Gantt Chart
P1
P1
P2
P3
P2
P3
P4
P3
P4
P4
P5
P6
P5
10
15
20
30
40
50
55
65
70
80
85
95
100
105
110
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.