Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(2) (16 points) Given the arrival time and CPU-burst of 5 processes shown in the

ID: 3739409 • Letter: #

Question

(2) (16 points) Given the arrival time and CPU-burst of 5 processes shown in the following diagram 41 Process Arrival Time (ms) Brst Ti 0 18 2 10 21 30 P2 P3 P4 P5 P6 25 10 42 35 12 Suppose the OS uses a 3-level feedback queue to schedule the above 6 processes. Round-Robin scheduling strategy is used for the queue with the highest priority and the queue with the second highest priority, but the time quantum used in these two queues is different. SJF scheduling strategy is used for the queue with the lowest priority. The scheduling is non-preemptive. Quantum 4 Quantum 8 Shortest-Job-First a) (10 points) Construct a Gantt chart depicting the schedule for the set of processes specified in the above diagram using this 3-level feedback queue. b) (6 points) Calculate the average waiting time for the schedule constructed in a)

Explanation / Answer

a)

->RR(Quantum = 4)

0---------------4------------------8-----------------12----------------16---------------20---------------24

->RR(Quantum = 8)

25---------------33-----------------39-----------------47----------------55---------------58-------------66

->SJF

67------------------80-------------------103------------------133

b)

Average Waiting Time = (67+33+103+80+55+58)/6 = 66

Do ask if any doubt. Please upvote.

P1 P2 P3 P4 P5 P6