I\'m having a lot of trouble understanding how to do this. Any help would be gre
ID: 3722186 • Letter: I
Question
I'm having a lot of trouble understanding how to do this. Any help would be great! Would prefer something thorough - really trying to understand how the table is built, how to compute waiting and turnaround time, and what the differences between the 2 are.
Thanks!!
Assume the following processes P1,P2, P3, P4 and P5 arrive at 1, 2, 4, 5, 5 respectively The CPU burst and the priority assigned to each process are: 45 5 15 20 3 P1: P2: P3: P4: P5: 25 2 4 For FCFS, RR, SJF and RR scheduling, determine a) the turnaround time for every process, b) waiting time for every process and the average waiting time, c) throughput for the system. Use a time quantum of 10 time units, and negligible context time.Explanation / Answer
FCFS
0--1-------------------46-------------------51--------------------66-----------------86-------------------111
TurnAround Time
P1 = 46
P2 = 51
P3 = 66
P4 = 86
P5 =111
Waiting Time
P1 = 0
P2 = 51-2 = 49
P3 = 66-4 = 62
P4 = 86-5 = 81
P5 = 111-5 = 106
Average Waiting time = (0+49+62+81+106)/5 = 59.6
SJF
0-1-----------------2-----------------7----------------22----------------42---------------67--------------111
TurnAround Time
P1 = 111
P2 = 7
P3 = 22
P4 = 42
P5 =67
Waiting Time
P1 = 67-1 = 66
P2 = 0
P3 = 7-4 = 3
P4 = 22-5 = 17
P5 = 42-5 = 37
Average Waiting time = (66+0+3+17+37)/5 = 123/5 = 24.6
Priority
0--1-------------4--------------5--------------25------------39--------------81-----------106-----------111
TurnAround Time
P1 = 81
P2 = 111
P3 =39
P4 = 25
P5 =106
Waiting Time
P1 =39-1= 38
P2 = 106-5 = 101
P3 = 25-4 = 21
P4 = 5-5 = 0
P5 = 81-5 = 76
Average Waiting time = (38+101+21+0+76)/5 = 47.2
RR(quantum = 10)
0-1----11------16-----26-----36-----46------56------61-----71------81-----91----96-----106------111
TurnAround Time
P1 = 111
P2 = 16
P3 = 61
P4 = 71
P5 =96
Waiting Time
P1 = 106-1= 105
P2 = 11-2 = 9
P3 = 16-4 = 12
P4 = 26-5 = 21
P5 = 91-5 = 86
Average Waiting time = (105+9+12+21+86)/5 = 46.6
c) Throughtput = 5 process/111 unit time = 0.045 processes per unit time
P1 P2 P3 P4 P5Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.