The Wayback Machine - https://web.archive.org/web/20220131065652/https://www.geeksforgeeks.org/applications-of-queue-data-structure/
Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Applications of Queue Data Structure

  • Difficulty Level : Basic
  • Last Updated : 16 Aug, 2021

Queue is used when things don’t have to be processed immediately, but have to be processed in First In First Out order like Breadth First Search. This property of Queue makes it also useful in following kind of scenarios. 

1) When a resource is shared among multiple consumers. Examples include CPU scheduling, Disk Scheduling
2) When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes. Examples include IO Buffers, pipes, file IO, etc. 
3) In Operating systems:
       a) Semaphores
       b) FCFS ( first come first serve) scheduling, example: FIFO queue
       c) Spooling in printers
       d) Buffer for devices like keyboard
4) In Networks:
       a) Queues in routers/ switches 
       b) Mail Queues
5) Variations: ( Deque, Priority Queue, Doubly Ended Priority Queue )

See this for more detailed applications of Queue and Stack. 

References: 
http://introcs.cs.princeton.edu/43stack/ 

 

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!