?Consider a FCFS and Round Robin (assumed timeslice = 2) process scheduler. Cons
ID: 3766374 • Letter: #
Question
?Consider a FCFS and Round Robin (assumed timeslice = 2) process scheduler.
Consider a FCFS and Round Robin (assumed timeslice = 2) process scheduler. Assume that there are three processes in the scheduling queue and that all three of them are ready to run. Scheduling starts at time t = 0. The CPU and I/O burst patterns of the three processes are shown as follows: Each process exits the system once its CPU and I/O bursts, as just shown, are complete. Show the CPU and I/O timelines that result with FCFS and Round Robin scheduling from t = 0 until all three processes exit the system. For each scheduling, what is the waiting time for each process? For each scheduling, what is the average throughput of the system?Explanation / Answer
Execution chart is shown below:
P1
P2
P3
P2
P4
20
30
40
55
70
Waiting Time = Completion Time - Arrival Time - Execution Time
Waiting Time = 55 - 15 - 25 = 15
Execution chart is shown below:
P0
P1
P0
P2
1
5
13
22
Waiting Time = Completion Time - Arrival Time - Execution Time
-----------------------------------
Pro AT BT CT WT
-----------------------------------
P0 0 9 13 4
P1 1 4 5 0
P2 2 9 22 11
-----------------------------------
Average Waiting Time = (4+0+11)/3 = 5ms
For FCFS, the order of execution will be according to their arrival time. The one which arrives first will be scheduled first. So the sequence of completion according to the FCFS policy will be P1, P2, P3. Since we have such option only in option-c its the right answer. Then what about RRS policy. Is the completion order given in option-c correct? Yes it is!
The execution chart and ready queue sequence at each time unit is given below. The orange box shows the Ready Queue Sequence and Blue shows the Execution Sequence. If the arrival time differs for the processes, always try to draw the ready queue also. Ready Queue will give you the the exact process to be scheduled next.
P1
P2
P3
P2
P4
20
30
40
55
70
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.