12
Kernel Synchronization – Part 1
With the previous chapter and the one preceding it (Chapters 11 and 10, respectively), you learned a good deal about CPU (or task) scheduling on the Linux OS. In this chapter and the following one, we shall dive into the – at times necessarily complex – topic of kernel synchronization.
As any developer familiar with programming in a multithreaded environment is well aware, there is a need for synchronization whenever two or more threads (code paths in general) may work upon a shared writable data item. Without synchronization (or mutual exclusion) in accessing the shared data, they can race; that is, the outcome cannot be predicted. This is called a data race. (In fact, data races can even occur when multiple ...
Get Linux Kernel Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.