Complete Computer Knowledge Portal

Wednesday, April 24, 2013

First Come First Serve (FCFS) CPU Scheduling

It is the simplest CPU scheduling algorithm in which CPU is allocated first to the process that request it first. This policy is managed by FCFS queue. When CPU is free it is allocated to the first process of the ready Queue and the running process is removed from the ready queue. The code generation for FCFS algorithm is simple. The main draw back of this technique is that average waiting time of a process is quite long.Consider the Following queue of process.

Process              Burst Time
    P1                         10
    P2                         40
    P3                         1


Let the process arrive in the order P1,P2 and P3 in ready queue and are to be served in FCFS order. The Gantt chart we will get is:


The waiting time for process P1 is 0 and P2 is 10 and for P3 is 50.The average wait time is 0+10+50/3=20 milliseconds.

This CPU scheduling Technique is a non-preemptive and if once the CPU has been allocated to a process, it will keep until it releases the CPU by termination request or process completion.

No comments:

Post a Comment