In: Computer Science
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:
Process Burst Time
P1 5
P2 3
P3 1
P4 7
P5 4
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
If FCFS scheduling is used, what is the average turnaround time of these processes?
Answer:
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:
Process Burst Time
P1 5
P2 3
P3 1
P4 7
P5 4
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
If FCFS scheduling is used, what is the average waiting time of these processes?
Answer:
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:
Process Burst Time
P1 5
P2 3
P3 1
P4 7
P5 4
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
If SJF scheduling algorithm is used, what is the average turnaround time of these processes?
Answer:
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:
Process Burst Time
P1 5
P2 3
P3 1
P4 7
P5 4
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
If SJF scheduling algorithm is used, what is the average waiting time of these processes?
Answer:
Solution:
Explanation:
=>In FCFS scheduling algorithm the job which comes first is scheduled first and the job which comes at the last is scheduled at the last.
=>In SJF the job that has least burst time is schedule first and the job that has largest burst time is scheduled at the last.
I have explained each and every part with the help of images attached to it.