There are three processes in the scheduling queue and assume that all three of t
ID: 3856367 • Letter: T
Question
There are three processes in the scheduling queue and assume that all three of them are ready to run.
Assume that P1 arrived a little before P2; and P2 arrived a little before P3.
Scheduling starts at time t = 0. The CPU and I/O burst patterns of the three processes are as shown below:
Each process exits the system once its CPU and I/O bursts as shown above are
complete. You are given the following schedule.
Please answer the following questions:
(a) What type of scheduler (FCFS, SJF, RR) will produce the above schedule? Explain your answer.
(b) What is the waiting time for each process?
Explanation / Answer
Answer
(a)-Out of the three types of schedulers(FCFS, SJF, RR), SJF-Shortest job First scheduler produces the above schedules. This algorithm schedules processes by their burst times i.e., the process with less CPU burst time will be processed first. This algorithm gives the minimum average waiting time by moving a short process before long one which decreases the waiting time of the short process. SJF or shortest job first can be both preemptive and non preemptive.
(b) Waiting time of each process
waiting time for process P1= 6
waiting time for process P2= 23( according to the given diagram)
waiting time for process p3= 2