'First come, first served' is a very very common way of organizing access to a limited resource or service in the real world. It can be explained by saying that whenever the resource is available the person who has been waiting the longest is served, and visualized by thinking of people standing in a single-file line, where the person at the front is always served next and new arrivals join the back of the queue.
If you ask someone why this system is the best, they might instinctively say 'It is the most fair'. But can we express what this fairness means in terms of some property, which is maximized for this system and no other? It doesn't mean for instance that people all wait the same time, or even that people who arrive at nearly the same time don't get served a long time apart.
Or does it optimize some other property, such as the incentive to arrive as soon as possible or the incentive not to arrive at busy times?
Can we make formal why it should be preferred to other arrangements? Or is it just a human tendency to do something simple/something that most people feel is fair/something we all know?
Queuing theory is primarily concerned with processes that have variability in arrival of jobs into the system. For example, jobs can be people needing service. The time taken to service these jobs is also generally variable. The result is congestion or waiting line. This can be measured by the average number of jobs in the queue and by the average waiting time of arrivals. There are costs associated with having jobs wait. There are also costs associated with adding more service capacity. Thus, challenge is to balance these costs. Queuing theory may be used to determine the optimum number of, say, serivce windows for a post office, Doctors available for clinic calls, number of clerks for a spare parts counter and so on. It may also be used to aid in decisions about the order in which customers should be processed to aid questions like "should there be an express lane". First in First Out, FIFO is a queuing discipline that is used in Queuing theory because of its modeling convenience. But there may be express or priority service for some jobs; an example is the express lane at many supermarkets for customers with 10 items or less in which case the service may be in random order. FIFO is a modeling convenience.
1) FIFO (First In First Out) also called FCFS (First Come First Serve) - orderly queue.
2) LIFO (Last In First Out) also called LCFS (Last Come First Serve) - stack.
3) SIRO (Serve In Random Order).
4) Priority Queue, that may be viewed as a number of queues for various priorities.
5) Many other more complex queuing methods that typically change the customer’s position in the queue according to the time spent already in the queue, expected service duration, and/or priority. These methods are typical for computer multi-access systems.
Most quantitative parameters (like average queue length, average time spent in the system) do not depend on the queuing discipline. That’s why most models either do not take the queuing discipline into account at all or assume the normal FIFO queue. In fact the only parameter that depends on the queuing discipline is the variance (or standard deviation) of the waiting time. There is this important rule (that may be used for example to verify results of a simulation experiment):
The two extreme values of the waiting time variance are for the FIFO queue (minimum) and the LIFO queue (maximum)