Presentiaon task sheduling first come first serve FCFS
Published on: Mar 4, 2016
Transcripts - Presentiaon task sheduling first come first serve FCFS
الرحيم الرحمن هللا بسم
Faculty of engineering
Electronics engineering dept
Prepared by: supervisor:
Process that requests the CPU FIRST is allocated the CPU FIRST.
It’s simplest to understand and the simplest to implement .
Other names of this algorithm are:
• First-In-First-Out (FIFO) .
• Run-to-Completion .
• Run-Until-Done .
This is a non-preemptive algorithm.
Example on real life such as: Buying tickets !
Example on computer system likes: sharing printers.
• FIFO queues.
• A new process enters the tail of the queue.
• The schedule selects from the head of the queue.
First-Come, First-Served (FCFS)
• Example: Three processes arrive in order P1, P2, P3.
– P1 burst time: 24
– P2 burst time: 3
– P3 burst time: 3
• Waiting Time
– P1: 0
– P2: 24
– P3: 27
• Completion Time:
– P1: 24
– P2: 27
– P3: 30
• Average Waiting Time: (0+24+27)/3 = 17
• Average Completion Time: (24+27+30)/3 = 27
P1 P2 P3
0 24 27 30
Problems with FCFS:
o Not optimal AWT.
Cannot utilize resources in parallel:
• Assume 1 process CPU bounded and many I/O
result: Convoy effect, low CPU and I/O Device
a convoy effect happens when a set of processes
need to use a resource for a short time, and one
process holds the resource for a long time, blocking
all of the other processes. Essentially, it causes poor
utilization of the other resources in the system.
Advantages and Disadvantages:
• easy to understand
• first come, first served
• Non-preemptive, that is, the process will run until it
• short processes which are at the back of the queue
have to wait for the long process at the front to
• Not good for time sharing systems.
• Because of its simplicity, FCFS is not very efficient.