Hacker News new | ask | show | jobs
by SilasX 3938 days ago
>This is all around a much better system than FIFO. Of course LIFO is the fastest on average, but you want there to be a reasonable, predictable bound on how much time an individual can expect to wait.

Right, this is generally handled by how we (implicitly) judge queues, not by the average wait, but by the average square of the wait, and penalize extreme wait times that are concentrated on one person.

It's why it's better to have one line feed into multiple clerks rather than each clearly get their own line: because there's the risk of some transaction taking a long time and screwing everyone in that line.

Single-queue avoids that by allowing people to be routed around that clerk. There's no change in the average, but you've avoided major quadratic penalties.

It's also the problem with LIFO: even if you could somehow stop people from leaving their early-entrance spot (!!) to re-enter for a better one, you're still sticking a few people with horrible wait times, which good metrics penalize.