First Come First Serve (FCFS).pptx

1,304 views 12 slides Sep 08, 2022
Slide 1
Slide 1 of 12
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12

About This Presentation

First Come First Serve (FCFS) Algorithm Easy way to learn Presentation.


Slide Content

Operating System CSE-3107 MD.SHAHRIAR PERVEZ EFTI Student of CSE Department

First Come First Serve (FCFS) First Come First Serve (FCFS) is a type of scheduling   algorithm  used by operating systems. 2 FCFS is a non-preemptive scheduling algorithm

Non-preemptive Non-preemptive scheduling is a CPU scheduling technique that holds a process until it finishes or is pushed into a waiting state. No process is interrupted until it completes. 3

4 FCFS With Arrival Time Here, the Arrival Time of P3 is 0.So, P3 Arrive first. Process AT BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 5 2 7 5

5 P3 GanttChart : 0 2 Here, Due to the arrival time of p3 being 0, P3 sits first in the ganttchart and runs for 2s Process AT BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 5 2 7 5

6 P3 P1 GanttChart : 0 2 3 Now we will check if any processor has arrived in 2 units of time . After checking we see that no process arrived in 2 units of time but again 2 new processes P1 and P4 both arrive in 3 units of time . Here, According to the sequence P1 is located before P4 .So before P1 arrives. And from 2 units of time to 3 unit of time the CPU will be idle. Process AT BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 5 2 7 5

7 7 Process AT BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 5 2 7 5 P3 P1 P4 P2 P5 GanttChart : 0 2 3 4 11 16 21 Now we will check if any processor has arrived in 3 units of time . After checking we see that P1 & P4 arrive in 3 units of time. But P1 arrive first and then P4 because of their sequence of order whose finishing time are 4 & 11. Then we will check in same way. After checking we see that P2 will sit and then P5 will sit whose finishing time are 16 & 21.

8 Process AT BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 5 2 7 5 4 6 2 11 21 1 12 2 8 16 7 1 11 P3 P1 P4 P2 P5 GanttChart : 0 2 3 4 11 16 21 Completion time(CT) of Process is collected from Gantt chart. Trun around time is calculated by these TAT=CT-AT. Waiting time is calculated by these WT=TAT-BT.

9 FCFS Without Arrival Time Here, Process will sits Gantt chart in according to their order. Process BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 5 2 7 5

P1 P2 P3 P4 P5 0 1 6 8 15 20 Process BT CT TAT WT P1 P2 P3 P4 P5 3 4 3 5 1 6 8 15 20 1 6 8 15 20 1 6 8 15 TAT=CT Due to absence of AT WT=TAT-BT. 10

Any questions? 11

Thanks You! 12