Lesson plan
lock convoy
In computer science, a lock convoy is a performance problem that can occur when using locks for concurrency control in a multithreaded application. A lock convoy occurs when multiple threads of equal priority contend repeatedly for the same lock. Unlike deadlock and livelock situations, the threads in a lock convoy do progress; however, each time a thread attempts to acquire the lock and fails, it relinquishes the remainder of its scheduling quantum and forces a context switch. The overhead of repeated context switches and underutilization of scheduling quanta degrade overall performance. A lock convoy behaves similarly to car convoys ("wide moving jam") forming and dissipating on highways suffering traffic congestion: when more cars drive on the road than the road can sustain, one car eventually has to stop. Cars coming right after it will also stop one after the other; this forms the convoy. Then when the first cars in the convoy can move again, new cars are still stopping at the rear of the convoy. While the cars at the front of the convoy can make progress, all the cars in the convoy have to wait in queue before being able to make progress again. Lock convoys often occur when concurrency control primitives such as locks serialize access to a commonly used resource, such as a memory heap or a thread pool.…
Article summary
In computer science, a lock convoy is a performance problem that can occur when using locks for concurrency control in a multithreaded application. A lock convoy occurs when multiple threads of equal priority contend repeatedly for the same lock. Unlike deadlock and livelock situations, the threads in a lock convoy do progress; however, each time a thread attempts to acquire the lock and fails, it relinquishes the remainder of its scheduling quantum and forces a context switch. The overhead of repeated context switches and underutilization of scheduling quanta degrade overall performance. A lock convoy behaves similarly to car convoys ("wide moving jam") forming and dissipating on highways suffering traffic congestion: when more cars drive on the road than the road can sustain, one car eventually has to stop. Cars coming right after it will also stop one after the other; this forms the convoy. Then when the first cars in the convoy can move again, new cars are still stopping at the rear of the convoy. While the cars at the front of the convoy can make progress, all the cars in the convoy have to wait in queue before being able to make progress again. Lock convoys often occur when concurrency control primitives such as locks serialize access to a commonly used resource, such as a memory heap or a thread pool.…
Key claims
No claims recorded.
Discussion questions
- Summarise the article in your own words. Which single claim would you verify first, and why?
- Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
- If two sources disagreed about one of these facts, what would you need in order to trust one over the other?
Bibliography
No sources recorded.
Key claims and bibliography are generated from the same tracked claims and sources as the article page.