Summary
Good going! I think you'll agree with me that this chapter was a really key one. Locking and concurrency are inherently complex topics, with all kinds of bad side effects (such as unexplained hangs, deadlock, performance issues, and even livelock) when used incorrectly. In this chapter, you began by refreshing the basics on several key points with regard to locking.
We mentioned – and again emphasize – that detailed coverage on locking technologies within the kernel (mutex, spinlock, atomic_t
, refcount_t
, per-CPU, and so on) are covered in detail in my earlier Linux Kernel Programming – Part 2 book's last two chapters. The eBook is freely downloadable (as both a PDF as well as a Kindle edition). The last chapter in the Linux Kernel Programming – Part 2 book covers key information on lock debugging techniques (especially lockdep) that are important.
This chapter then delved into what actually constitutes a data race (as defined by...