FIFO stands for First In, First Out. FIFO is a type of data handling where element that is first to come will be first element to be processed.
In technical terms, FIFO means that element which was stored as first element will befirst to be removed. It happens so because FIFO follows a queue type data structure. Thus, oldest element or element that was encountered first during this operation will get out first as it will be in the front.
Example for this is Ticket counter present at movie theaters or stalls. The first one in line will be first one to get ticket and will leave first. The last person to enter line will be last one to leave because it will get ticket in the last.
Characteristics of FIFO :
- Queue, a linear data structure is implemented using FIFO principle.
- Elements are added/removed from different end so there is no criteria of wait and hold.
- A fixed amount of memory is consumed as memory utilization will not vary with each operation.
- Data Structures –
Certain data structures like Queue and other variants of Queue uses FIFO approach for processing data.
- Disk scheduling –
FIFO is used in Disk Scheduling Algorithms by disk controllers to decide which process came in first to be executed.
- Communications and networking –
Packets are held in between routers in order of their arrivals by use of FIFO technique. This helps in deciding which packet is to be transferred in which order.
- It is easy to implement and understand.
- It is used in many real-world applications like ticket counter of movie halls, railway counters, etc.
- Elements cannot be accessed randomly as FIFO only supports First In First Out methodology.
- The process effectiveness is low.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Named Pipe or FIFO with example C program
- TCL Full Form
- LFU Full Form
- VPN Full Form
- DOS Full Form
- SAS Full Form
- OSI Model Full Form in Computer Networking
- HDMi Full Form
- LCD Full Form
- ZIP Full Form
- API Full Form
- RTC Full Form
- VLAN Full Form
- WPA Full Form
- DQL Full Form
- VGA Full Form
- ISP Full Form
- SGML Full Form
- DHCP Full Form
- LED Full Form
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.