FCFS

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 6

First-Come, First-Served Scheduling

V.Ashwini
Asst.Prof
TOCE
Bengaluru
Other names of FCFS algorithm are:
– First-In-First-Out (FIFO)
– Run-to-Completion
– Run-Until-Done
• Simplest scheduling algorithm.
• Processes are dispatched according to their arrival
time on the ready queue.
• This algorithm is always non-preemptive, once a
process is assigned to CPU, it runs to completion.
• Convoy effect, as all the short processes wait for
the completion of one big process. Resulting in
lower CPU and device utilization.
FCFS

• Disadvantages:
• FCFS is not good for time sharing systems, where
each user needs to get a share of the CPU at regular
intervals.
• Short jobs(process) may have to wait for long time
• Important jobs (with higher priority) have to wait
• Cannot guarantee good response time
• Average waiting time and turn around time is often
quite long
• Lower CPU and device utilization.
Consider the following set of process that arrive in the order P1,P2,P3 with the
length of CPU burst given in milliseconds. Calculate the average waiting time.
Provide the Gantt chart for the same

Process Burst Time Waiting Avg Waiting


Time Time
P1 24 0
= (0+24+27)/3
P2 3 24 = 17 ms
P3 3 27

Gantt Chart

P1 P2 P3
0 24 27 30
Exercise
Calculate the average waiting time by drawing
Gantt chart using FCFS algorithm
Process Burst Time
P1 9
P2 4
P3 9
P4 5
VTU,June/July 2019
Thank You

You might also like