logoalt Hacker News

thaumasiotestoday at 3:18 AM1 replyview on HN

> An underappreciated queue type is LIFO (last-in, first-out). It sounds unfair, but it keeps you from moving the median response time at the cost of the maximum response time

Why is that beneficial?


Replies

ajbtoday at 4:11 AM

Suppose you are a building contractor. You have given start dates for future jobs, but your current job is going to run over the expected time. You can choose between:

1 slip every job, annoying all of the customers whose jobs are queued up. You get a bad reputation.

2 Move onto the next job on time, and gradually complete the stalled job in the background by sending workers back to it when you have spare (which you should have, because in general you must overestimate or things will go badly wrong). That customer will now suffer because their job is going to take a multiple of the expected time, but all of the other customers are happy, so your reputation is good.

show 1 reply