0% found this document useful (0 votes)
16 views20 pages

Group 6 FCFS

The document provides information about the First-Come First-Served (FCFS) CPU scheduling algorithm. FCFS schedules processes in the order of arrival, with the earliest arriving process executed first. It uses a first-in, first-out queue to manage process scheduling. FCFS has advantages of simplicity, no starvation, and low overhead. However, it can lead to poor average waiting times and turnaround times due to the convoy effect where short processes wait for longer ones. Examples are provided to demonstrate calculating waiting times and turnaround times under FCFS scheduling.

Uploaded by

gwapogi0320
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views20 pages

Group 6 FCFS

The document provides information about the First-Come First-Served (FCFS) CPU scheduling algorithm. FCFS schedules processes in the order of arrival, with the earliest arriving process executed first. It uses a first-in, first-out queue to manage process scheduling. FCFS has advantages of simplicity, no starvation, and low overhead. However, it can lead to poor average waiting times and turnaround times due to the convoy effect where short processes wait for longer ones. Examples are provided to demonstrate calculating waiting times and turnaround times under FCFS scheduling.

Uploaded by

gwapogi0320
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Polytechnic University of the Philippines – Paranaque Campus

First-Come, First Served


Scheduling
Operating System

Prepared by: Group 6


Meet the
members

Canadilla, Carl James Benciang, Melvin Figurasin Katherine

Monterde, Pinky Panganiban, Danielle Jade Romero, Carlos Angelo Serafico, Kyle David
First-Come, First Served

● FCFS

● The process that requested the CPU


first is allocated first (arrival
time/loaded in memory)

● Managed using a FIFO (first-in, first-


out) queue
FCFS
● Average waiting time is not generally ● Suffers from convoy effect,
minimal. where short processes wait for
the long process to get off the
● A short process may have to wait a very CPU
long time before it can execute
● FCFS is a non-preemptive, that
● Favors CPU-bound processes is a process which gets CPU
allocation keeps the CPU until it
- I/O processes have to wait until CPU-bound releases the CPU (by
processes complete terminating or requesting an
I/O).
ADVANTAGE DISADVANTA
S GES
● Simple and Easy ● Convoy Effect
● No Starvation ● No Priority Consideration
● Low Overhead ● Poor Turnaround Time
ARRIVAL COMPLETION
TIME TIME
TURN AROUND TIME

WAITING TIME

TERMINATI
READY
RUN ON
QUEUE

RAM CPU
FORMULA TO REMEMBER

WAITING TIME = COMPLETION TIME – ARRIVAL TIME –


BURST TIME
01
EXAMPLE
PROCESS WAITING TIME BURST TIME

P1 0
P1 = 24-0-24
24

P2 P2 = 27-0-324 3

P3 27
P3 = 30-0-3 3

 Average waiting time: (0 + 24 + 27)/3 = 17

 Suppose that the processes arrive in the order at time 0: P1 , P2 , P3 . The Gantt Chart for
the schedule is:

P1 P2 P3

0 24 27 30
02
EXAMPLE
PROCESS WAITING TIME BURST TIME

P2 P2 = 3-0-3 0 3

P3 P3 = 6-0-3 3 3

P1 6
P1 = 30-0-24 24

 Average waiting time: (6 + 0 + 3)/3 = 3

 Suppose that the processes arrive in the order at time 0: P1 , P2 , P3 . The Gantt Chart for
the schedule is:

P2 P3 P1

0 6 30
3
03
EXAMPLE
JOB ARRIVAL WAITING BURST TIME
TIME TIME

1 1 0
10-1-9 9
2 3 7
13-3-3 3
3 4 9
15-4-2 2
4 6 9
16-6-1 1
5 7 9
23-7-7 7
Average Waiting Time = (0 + 7 + 9 + 9 + 9)/5 = 34/5 = 6.8

J1 J2 J3 J4 J5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
FORMULA TO REMEMBER

WAITING TIME = COMPLETION TIME – ARRIVAL TIME –


BURST TIME

WAITING TIME = TURN AROUND TIME – BURST TIME

TURN AROUND TIME = COMPLETION TIME – ARRIVAL TIME


04
EXAMPLE
PROCESS ARRIVAL TIME TURN AROUND BURST TIME WAITING TIME
TIME

P1 4 5
9-4 5 0
5-5
P2 6 11
17-6 4 7
11-4
P3 0 3
3-0 3 0
3-3

P4 6 13
19-6 2 11
13-2
P5 5 8
13-5 4 4
8-4
8 4.4

P3 P1 P5 P2 P4
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
05
EXAMPLE
PROCESS ARRIVAL TIME TURN AROUND BURST TIME WAITING TIME
TIME

P1 8 13
21-8 5 7
13-5

P2 1 10
11-1 3 7
10-3
P3 0 8
8-0 8 0
8-8

P4 15 12
27-15 6 6
12-6
P5 4 11
15-4 5 6
10-4
10.80 5.2

P3 P2 P5 P1 P4
0 8 11 16 21 27
Show with a Gantt chart the execution of the processes using FCFS. Compute for the
average waiting time and average turn over time of the processes. 25 points each

1.) PROCESS ARRIVAL


TIME
BURST TIME 2.) Jobs ARRIVAL
TIME
BURST TIME

P1 2 2 J3 25 4
P2 0 1 J5 19 23
P3 2 3 J2 11 15
P4 3 5 J1 6 20
P5 4 4 J4 2 7
THANK YOU
FOR
LISTENING!!

You might also like