What is the use of Scheduling Algorithms?
– Another name for scheduling algorithms is the scheduling disciplines.
– These algorithms are required for the distribution of the resources to the programs that request for them either simultaneously or asynchronously.
– These algorithms are used both in operating systems and the routers.
– In operating systems, these are used for dividing the CPU among processes.
In this article we discuss about one scheduling algorithm called FIFO or first in first out.
What is First In First Out – FIFO Scheduling Algorithm?
– FIFO algorithm is also known as the FCFS or first come, first served algorithm.
– This is perhaps the simplest of all the scheduling algorithms available.
– In this algorithm, the processes are simply queued in the order of their arrival in the ready queue.
– There are certain salient features of this algorithm as mentioned below:
- Only when the process is terminated, the context switch occurs. Reorganization of the process queue is not required here. The overhead of scheduling is very less when compared to the other scheduling algorithms.
- The CPU can be held for a long time by the long processes which can cause the throughput to be quite low.
- The same reason can cause the waiting time, turnaround time and response to be high.
- In this algorithm holds no chances for prioritization and this cause this algorithm to face troubles in meeting the deadlines of the processes.
- Because of this lack of prioritization no starvation occurs till the completion of the process. But in an environment where some processes could not achieve completion, possibilities of occurrence of starvation are high.
- This algorithm is dependent up on queuing.
– This algorithm can be considered to be an abstraction of the ways of manipulation and organization of the data in relation to the prioritization as well as time.
– The principles of queue processing technique are involved in this algorithm.
– The CPU time is given to the processes in the order in which they come in the queue.
– It is just opposite of the LIFO (last in first out) stack abstraction.
– But the similarity between these two is that they both are they represent specific cases of the list implementation.
– The only difference lies in the rules that are implemented in accessing its content.
– This can be better understood with the help of the LIFO synonym ‘FILO’ which stands for first IN last OUT.
– There have been references to head and tail in FIFO queues and has stirred a lot of controversy.
– This algorithm is more common in operating systems such as linux.
– A named pipes and filters used in some computing environments for inter – process communication is just another implementation of FIFO scheduling algorithm.
– FIFO is used in disk scheduling in disk controllers for the determination of the order serving to the I/O requests of the disk.
– FIFO is used by the following communication components for holding data packets to be routed to their respective destinations:
– Typically, for every network there is one FIFO structure implemented.
– Multiple FIFOs are featured in some devices for independent and simultaneously queuing of all sorts of information. – But the most common use of FIFO is in electronic circuits for flow control and buffering from hardware to software.
– In hardware form of FIFO, it consists of control logic, storage and some read and write pointers.
– The storage can be anything out of latches, flip – flops, SRAM.
– There are two types of FIFO implementations:
- Synchronous FIFO: here both the read and write functions use the same clock.
- Asynchronous FIFO: here different clocks are used.