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

Goal Practice solving scheduling problems. Output Complete the following tasks a

ID: 3741132 • Letter: G

Question

Goal Practice solving scheduling problems. Output Complete the following tasks and submit it to the correlating assignment submissions folder. Supply screenshots to support your answers. Procedure Consider the following set of processes with the length of CPU burst given in milliseconds. Assume the processes arrive in the specified order (P1, P2, .), but ignore the arrival delay, unless instructed otherwise Processes with the length of CPU burst given in milliseconds Process Burst Time (ms) Priority Arrival time (ms) 10 P2 P3 4 4 P5 Tasks 1. What is the average waiting time if FCFS algorithm is used? Ignore the arrival delay 2. What is the average waiting time if processes arrive in the reverse order (P5, P4, , P1) and FCFS algorithm is used? Ignore the arrival delay 3. What is the average waiting time if SJF algorithm is used? Ignore the arrival delay 4. What is the average waiting time if SJF with preemption algorithm is used? Use "Arrival time" column 5. What is the average waiting time if nonpreemptive priority algorithm is used? Use "Priority" column. 6. What is the average waiting time if RR (quantum 1) algorithm is used? Ignore the arrival delay. 7. What is the average waiting time if RR (quantum 2) algorithm is used? Ignore the arrival delay 8. What is the average waiting time if processes arrive in the reverse order (P5, P4, , P1) and RR (quantum 2) algorithm is used? Ignore the arrival delay 9. What is the average waiting time if RR (quantum 4) algorithm is used? Ignore the arrival delay. 10, what is the average waiting time if processes arrive in the reverse order (P5, P4, , P1) and RR (quantum = 4) algorithm is used? Ignore the arrival delay

Explanation / Answer

1.FCFS

0-------------------10--------------------12-------------------16--------------------17-------------------23

Average waiting time = (0+10+12+16+17)/5 = 11

2.FCFS with reverse order

0-------------------6--------------------7-------------------11--------------------13-------------------23

Average waiting time = (0+6+7+11+13)/5 = 7.4

3 SJF(without preemption

0-------------------1--------------------3-------------------7--------------------13------------------------23

Average waiting time = (0+1+3+7+13)/5 = 4.8

4. SJF with preemption

0-----------------1----------------3------------------4------------------8-----------------14----------------23

Average waiting time = (14+1+4+3+8)/5 = 6

5. non preemptive priority

0-------------------2--------------------8-------------------18--------------------22-------------------23

Average waiting time = (8+0+18+22+2)/5 = 10

6.RR(Qunatum = 1)

0-1---2---3---4--5---6--7---8---9---10-11--12--13--14--15--16--17--18--19--20--21--22---23

Average waiting time = (22+6+13+3+18)/5 = 12.4

7. RR(Quantum =2)

0------2---------4--------6-------7--------9--------11------13-------15------17------19------21------23

Average waiting time = (21+2+11+6+17)/5 = 11.4

8.RR(Quantum =2) with reverse order

0------2--------3--------5-------7--------9--------11------13-------15------17------19------21------23

Average waiting time = (21+5+11+2+15)/5 = 10.8

9. RR(Quantum =4)

0-----------4------------6-------------10------------11-----------15-----------19----------21-----------23

Average waiting time = (21+4+6+10+19)/5 = 12

10. RR(Quantum =4) with reverse order

0-----------4------------5-------------9-----------11-----------15-----------17----------21-----------23

Average waiting time = (21+9+5+4+15)/5 = 10.8

Do ask if any doubt. Please upvote.

P1 P2 P3 P4 P5
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote