Kernel Level Concurrency: Locks and Kernel Preemption

            Jiannan Ouyang  

Kernel level locking is confusing and error-prone. The concept of kernel kernel preemption makes the situation worse. To prevent race condition, should we use locks, disable preemption or disable interrupts? How are these mechanisms related to and different from each other. This article will try to answer this questions about kernel concurrency.