Uut expect to have the faster Which queue would you response
Solution
8)
FCFS (First come first serve) : The process that arrives first serviced first. There is no preemption no priority.
Therefore
for process A start at 0
Process B starts at 15
Process C starts at 17
process D starts at 31
E starts at 41
Sequence : A,B,C,D,E
SJN (shortest job Next): In this algorithm job that need less CPU cycles executed first.
There the order would be
E, B, D,C,A
E starts at 0 B starts at 1 D starts at 3 C starts at 13 A starts at 27
SRT (Shortest remaining time) : SRT is the preemptive version of the SJN algorithm.The processor is allocated to the job closest to completion but it can be preempted by a newer ready job with shorter time to completion.
Round Robin (RR) : Round Robin is the preemptive process scheduling algorithm.
Each process is provided a fix time to execute, it is called a quantum.Once a process is executed for a given time period, it is preempted and other process executes for a given time period.
Here in this case quatntum is 5.
there fore A is provided 5 cpu cycles to perform to job Then preemption will allow process B 5 quantum similarly C, D, E. B & E are finished and dont require CPU in next cycle /turn.
Then again it comes to A as it still needs (15-5=10) 10 cpu cycle, then C (as Job B and E are finished as given quantum 2<5 and 1<5), then D as it still need 5 (10-5) cpu cycles. B & E are finished and dont require CPU.
Then again it starts from A as it still require 5 (15-10) CPU cycles, then C as it still needs 4 (14-10) cpu cycles .All the jobs are finished now.
The sequence would be
A,B,C,D,E,A,C,D,A,C
