In: Computer Science
We will denote the last digit of your ASU ID as L (if L = 0, then use L = 4)
Consider three processes of the form CPU
P1:
[CPU burst of length L; I/O burst of length 4*L; CPU burst of length L]
P2:
[CPU of 2*L; I/O of 4*L; CPU of L; I/O of 2*L; CPU of 3*L]
P3:
[CPU of L; I/O of L; CPU of 2*L; I/O of L; CPU of L]
1.) What is the average CPU utilization for FIFO scheduling for the scenario?
2.) What is the average CPU utilization for SJF scheduling with shortest remaining CPU burst?
PLEASE GIVE IT A THUMBS UP, I SERIOUSLY NEED ONE, IF YOU
NEED ANY MODIFICATION THEN LET ME KNOW, I WILL DO IT FOR YOU
AS I DONE MOST OF YOUR ANSWERS, THOUGH WE ARE ONLY ALLOWED TO
ATTEMPT ONE ANSWER OR FOUR SUB PARTS, PLEASE GIVE IT A THUMBS
UP
1.) What is the average CPU utilization for FIFO scheduling for the scenario?
In FIFO Scheduling, Processes are planned for the CPU on the standards of appearance time in the event that for any two cycle appearance time is same, at that point plan the cycle which is first in the table.
First cycle P1 will be planned and after length L it will move out from CPU for I/O consummation and again return to prepared state on length 5L(L+4L). In this way, the fresh introduction time for measure P1 is 5L.
Presently measure P2 will be planned and after length 2L it will move out from CPU for I/O finish and again return to prepared state on length 7L(3L+4L). Along these lines, the fresh introduction time for measure P2 is 7L.
Presently measure P3 will be booked and after length L it will move out from CPU for I/O fruition and again return to prepared state on length 5L(4L+L). In this way, the fresh introduction time for measure P3 is 5L.
As of now there is no cycle in the prepared state so CPU will be inert until any cycle comes in the prepared state.
Presently, Process P1 and P3 has same appearance length at that point cycle P1 will be planned for CPU and after length L it will be ended.
Presently measure P3 will be planned and after length 2L it will move out from CPU for I/O finish and again return to prepared state on length 9L(8L+L). Along these lines, the fresh debut time for measure P3 is 9L.
Presently measure P2 will be booked and after length L it will move out from CPU for I/O fulfillment and again return to prepared state on length 11L(9L+2L). Thus, the fresh introduction time for measure P2 is 11L.
Presently, Process P3 will be planned for CPU and after length L it will be ended.
As right now there is no cycle in the prepared state so CPU will be inactive until any cycle comes in the prepared state.
Presently, Process P2 will be planned for CPU and after length 3L it will be ended.
Average Turn Around Time = (6L + 14L + 10L)/3 = 10L
2.) What is the average CPU utilization for SJF scheduling with shortest remaining CPU burst?
In SJF Scheduling, Processes are planned for the CPU on the standards of most brief CPU burst time on the off chance that for any two cycle CPU busrt time is same, at that point plan the cycle as per their appearance time.
First cycle P1 will be booked and after length L it will move out from CPU for I/O culmination and again return to prepared state on length 5L(L+4L). Along these lines, the fresh debut time for measure P1 is 5L.
Presently measure P3 will be planned and after length L it will move out from CPU for I/O fulfillment and again return to prepared state on length 3L(2L+L). In this way, the fresh introduction time for measure P2 is 3L.
Presently measure P2 will be planned and after length 2L it will move out from CPU for I/O culmination and again return to prepared state on length 8L(4L+4L). Thus, the fresh introduction time for measure P2 is 8L.
Presently measure P3 will be booked for length L.
Presently, Process P1 and P3 has same CPU burst time at that point cycle P1 will be planned for CPU and after length L it will be ended.
Presently measure P3 will be planned and after length L it will move out from CPU for I/O fulfillment and again return to prepared state on length 8L(7L+L). Thus, the fresh debut time for measure P3 is 8L.
Presently, Process P2 and P3 has same CPU burst time at that point cycle P2 will be planned for CPU and after length L it will move out from CPU for I/O fruition and again return to prepared state on length 11L(9L+2L). In this way, the fresh debut time for measure P2 is 11L.
Presently, Process P3 will be planned for CPU and after length L it will be ended.
As right now there is no cycle in the prepared state so CPU will be inactive until any cycle comes in the prepared state.
Presently, Process P2 will be planned for CPU and after length 3L it will be ended.
Average Turn Around Time = (6L + 14L + 10L)/3 = 10L