23 ms·
In the context of queueing theory, there are many service disciplines[1] that can be used, which are not necessarily FIFO. Depending on what you're optimizing
by meatmanek 11y ago
In the context of queueing theory, there are many service disciplines[1] that can be used, which are not necessarily FIFO.
Depending on what you're optimizing for, and the behaviors of your system (arrival process, task size distribution, number of servers, preemption overhead, etc.), it can be much better to process things in an order other than arrival order.
In particular, FIFO can mean small tasks end up waiting a long time behind large tasks. (Imagine going into a shop that sells sandwiches and pre-packaged salads; you want a salad, and there are 5 people waiting for sandwiches. Should you have to wait until the clerk makes 5 sandwiches before you can get your salad and leave?)
1. https://en.wikipedia.org/wiki/Queueing_theory#Service_disciplines https://en.wikipedia.org/wiki/Queueing_theory#Service_discip...