fbpx
Wikipedia

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.[1][2] 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.

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. They can sometimes be addressed by using non-locking alternatives such as lock-free algorithms or by altering the relative priorities of the contending threads.


See also edit

References edit

  1. ^ Silberschatz, Abraham (2013). Operating System Concepts. John Wiley & Sons Inc. ISBN 978-1118129388.
  2. ^ Blasgen, Mike; Gray, Jim; Mitoma, Mike; Blasgen, Mike; Mitoma, Like (1979). "The convoy phenomenon". Operating Systems Review. 13 (2): 20–25. CiteSeerX 10.1.1.646.921. doi:10.1145/850657.850659. S2CID 40305779.

lock, convoy, this, article, needs, additional, citations, verification, please, help, improve, this, article, adding, citations, reliable, sources, unsourced, material, challenged, removed, find, sources, news, newspapers, books, scholar, jstor, march, 2016, . This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Lock convoy news newspapers books scholar JSTOR March 2016 Learn how and when to remove this message 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 1 2 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 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 They can sometimes be addressed by using non locking alternatives such as lock free algorithms or by altering the relative priorities of the contending threads See also editThundering herd problemReferences edit Silberschatz Abraham 2013 Operating System Concepts John Wiley amp Sons Inc ISBN 978 1118129388 Blasgen Mike Gray Jim Mitoma Mike Blasgen Mike Mitoma Like 1979 The convoy phenomenon Operating Systems Review 13 2 20 25 CiteSeerX 10 1 1 646 921 doi 10 1145 850657 850659 S2CID 40305779 Retrieved from https en wikipedia org w index php title Lock convoy amp oldid 1121123489, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.