Israeli Queues
arpitbhayani.me
arpitbhayani.me
- Batching Queues
- Friend Queues
- Group Queues
The name 'Israeli Queues' is unacceptable to many people because of the country's institutionalized racism [0].
Anyway I was confused by the comment about starvation. I thought a friendless element should always be making progress toward the front batch even if there's regress in terms of how many items are in front of it. This is unlike a priority queue which can starve an element indefinitely by things coming in at the same rate they're processed.
Then I realized the error in my thinking: new elements can be added to the front batch while it is currently being processed. So the front batch can starve all later batches indefinitely.
You could prohibit adding to the current batch I suppose, without complicating the data structure too much.