Dealing with concurrency Concurrency must be managed Or the kernel will not run reliably Mutual exclusion ("Critical sections") Only allow one thread in at once The core concurrency management technique Kernel programmers must protect: Shared data structures Hardware resources Linux mutual exclusion methods: Semaphores Spinlocks Completions Seqlocks Read-copy-update