The Convoy Phenomenon

The Convoy Phenomenon

Here are their respective stats:

If a process P1 goes into a wait state while it holds a high traffic lock L (e.g. for a buffer pool) then all other processes will be scheduled and will more or less immediately request L (it’s a high traffic lock remember). Now P1 which holds the lock is sleeping, and all the other processes are waiting for the lock that P1 holds:

That already looks bad, but it turns out to be a trap from which the system finds it very hard to escape:

With N processes and M processors, where N is much bigger than M, the lock queue will contain N-M processes and each process will have a execution interval of 1000 instructions. System R code followed the following rules:

If you’re in control of process scheduling then you can greatly reduce the probability of being caught out holding a high traffic lock.

Source: blog.acolyer.org

Leave a Reply

Your email address will not be published. Required fields are marked *