Introduction to Concurrency Bugs

This lesson presents a gentle introduction of this chapter on different kinds of concurrency related bugs in the OS.

Researchers have spent a great deal of time and effort looking into concurrency bugs over many years.“System Deadlocks” by E.G. Coffman, M.J. Elphick, A. Shoshani. ACM Computing Surveys, 3:2, June 1971. The classic paper outlining the conditions for deadlock and how you might go about dealing with it. There are certainly some earlier papers on this topic; see the references within this paper for details. Much of the early work focused on deadlock, a topic which we’ve touched on in the past chapters but will now dive into deeply. More recent work focuses on studying other types of common concurrency bugs (i.e., non-deadlock bugs). In this chapter, we take a brief look at some example concurrency problems found in real code bases, to better understand what problems to look out for. And thus our central issue for this chapter:

CRUX: HOW TO HANDLE COMMON CONCURRENCY BUGS

Concurrency bugs tend to come in a variety of common patterns. Knowing which ones to look out for is the first step to writing more robust, correct concurrent code.

Get hands-on with 1400+ tech skills courses.