A queue is a type of data structure where items or tasks sit in a predetermined order to optimize the processing of the items. In this article, items refer to any variable—an individual, organization, or a machine’s records, stores, or processes.
The most common use of queue is its application to computer science and machine programs. No matter the job, computers cannot process every request simultaneously. Instead, computers must process a list of items at different times or rates.
In computer science, queues are the lines of operations or tasks that need servicing within a machine. A typical example of a queue in action is print spooling. When a user prints multiple documents, the printer receives these jobs and stores the queue in memory. The user can do other work as the printer continues processing the queue and prints each document one at a time as resources to print become available.
The first characteristic of any queue is the number of items in the queue. Limited queueing systems have a set number of items they can hold, while unlimited queuing systems are theoretically open to an infinite number.
When new items arrive, the queuing system needs a process for receiving the items. Most queuing systems receive items at random intervals and must place the item appropriately in its queue.
As a sequence of items being processed or served, queues require a system or method for processing items known as a queue discipline. Queues in the real world are usually sequential, processing one item after the next in the order they arrived (also known as First-In-First-Out or FIFO). Still, different jobs require additional methods to optimize processing.
Organizations working with multiple queues employ what is known as a queuing network.
The basis for queueing systems is the service each item receives upon reaching the front of the queue. Also known as the service pattern, these are the programmed transactions that keep the queue moving until empty.
The speed of servicing for items depends on the number of system channels. A single channel system can only process one queue item at a time, while a multi-channel approach can take on multiple items for processing simultaneously.
Whether it’s multiple cashiers for a grocery store or various servers for data requests, the number of processors also increases the speed at which items move through the queue.
After servicing, items are of no interest to the queue model. Only upon reentering the queue does the queueing system once again store and process the item. Advanced queueing systems can store item information like task details or a customer’s data for reuse at a later transaction.
Queue disciplines are the methods of organizing items based on the time of their arrival and expected processing.
A first-in, first-out (FIFO) system organizes a sequence so that items process in sequential order. As items arrive, the queueing system positions the new items at the rear of the sequence. Items that arrive sooner move up in the queue order as the front of the queue processes.
“Last in, last out” or LIFO is a method of organizing a sequence so that the items received most recently process first. Arriving items position at the front of the queue and are the first to move out.
The SIRO queueing method stands for “serve in random order,” and items received are placed randomly in the queue.
As queueing technology developed, organizations using multiple queues or different types of items can also elect a process of serving prioritized queue items.
Queue management software is a program designed to manage an organization’s queues. Features like predictive analysis and automated item flows based on customer information help companies structure customer intake, servicing, and processing. Queue management software is most employed for scheduling and customer management.
In 2020, the global queue management software market’s combined value was $500 million.
The second most common use for the word queue is the physical event of organizing and filling a line or set of items. Examples include people buying tickets at the movie theatre or cars moving through a drive-thru. Like their virtual counterparts, real-world queues are a method of structuring items or people to optimize services.
Queue, as a verb, is mentioned in the context of computer science and real-world queues. Queueing is the act of organizing a real-world or digital sequence. In social contexts, “to queue it up” means to pull an item from a list to the front or add something to a list, such as a music playlist.