Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • thanks for your reply, but I don't quite get the analogy with elevator. In elevator model tasks are naturally dependant. For example if elevator goes from level 100 to ground level, it could (and should) pick up all the people on its way down. I guess it's a crucial difference between elevator scenario and the one I'm trying to solve. As I said, all tasks have the same priority, so priority queue will turn on into FIFO. However if we consider that value of the task higher when task is the most recent, then it will turn on into LIFO Commented Jun 23, 2020 at 14:35
  • @mnaoumov Sorry if the example was misleading. Indeed, the elevator problem is slightly more complex since the elevator can carry more passengers than a single task : route optimization plays a role as well. My analogy, was only meant about the waiting time of people being served by the elevator and the fact that outcome is equivalent: either the passenger is waiting, or is being transported or is arrived. Nothing different happens if elevator first serves A then B or the contrary. The worst case is only that a passenger takes the stair instead of waiting. No dependency either. Commented Jun 23, 2020 at 16:05