Title: First In First Out (FIFO)
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

FIFO, also known as First Come, First Served (FCFS), is the simplest scheduling algorithm.  FIFO simply queues processes in the order that they arrive in the ready queue.

- Since context switches only occur upon process termination, and no reorganization of the process queue is required, scheduling overhead is minimal.
- Throughput can be low, since long processes can hold the CPU.
- Turnaround time, waiting time and response time can be high for the same reasons above.
- No prioritization occurs, thus this system has trouble meeting process deadlines.
- The lack of prioritization means that as long as every process eventually completes, there is no starvation. In an environment where some processes might not complete, there can be starvation.
- It is based on Queuing.

First In First Out also called FIFO, or FCFS, such as:

Process | Duration | Order | Arrival time
P1 | 24 | 1 | 0
P2 | 3 | 2 | 0
P3 | 4 | 3 | 0

- P1 finishes at 24, P2 finishes at 27, and P3 finishes at 31
- Average wait time is (0 + 24 + 27) / 3 = 31

Activity:

- Read the FIFO article.