This is correct. When "3" requests the resource, it is empty so it gets the slot. The remaining processes have to queue and will get the resource in the order 1, 2, 4, 5.
If you use the PreemptiveResource instead (like request(priority=id,
preempt=True)
), 3 will still get the resource first but will be preempted by
2. 2 will then get preempted by 1. 2 and 3 would then have to request the
resource again to gain access to it.