Professional Documents
Culture Documents
Monterde, Pinky Panganiban, Danielle Jade Romero, Carlos Angelo Serafico, Kyle David
First-Come, First Served
● FCFS
WAITING TIME
TERMINATI
READY
RUN ON
QUEUE
RAM CPU
FORMULA TO REMEMBER
P1 0
P1 = 24-0-24
24
P2 P2 = 27-0-324 3
P3 27
P3 = 30-0-3 3
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
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
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
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!!