OS | FCFS | Exp - 1
First Come First Serve Scheduling
In the "First come first serve" scheduling algorithm, as the name suggests, the process which arrives first, gets executed first, or we can say that the process which requests the CPU first, gets the CPU allocated first.
- First Come First Serve, is just like FIFO(First in First out) Queue data structure, where the data element which is added to the queue first, is the one who leaves the queue first.
- This is used in Batch Systems.
- It's easy to understand and implement programmatically, using a Queue data structure, where a new process enters through the tail of the queue, and the scheduler selects process from the head of the queue.
- A perfect real life example of FCFS scheduling is buying tickets at ticket counter.
Problem Statement
There are 5 person A, B, C, D, E want to book ticket from railway reservation counter. The person who come first will get the ticket first. Compute the waiting time for each Person.
File: Download here
There are 5 person A, B, C, D, E want to book ticket from railway reservation counter. The person who come first will get the ticket first. Compute the waiting time for each Person.
No comments: