Skip to Content
Mastering Linux Kernel Development
book

Mastering Linux Kernel Development

by CH Raghav Maruthi
October 2017
Intermediate to advanced
354 pages
9h 28m
English
Packt Publishing
Content preview from Mastering Linux Kernel Development

Mutex locks

Spinlocks by design are better suited for scenarios where lock is held for short, fixed intervals of time, since busy-waiting for an indefinite duration would have a dire impact on performance of the system. However, there are ample situations where a lock is held for longer, non-deterministic durations; sleeping locks are precisely designed to be engaged for such situations. Kernel mutexes are an implementation of sleeping locks: when a caller task attempts to acquire a mutex that is unavailable (already owned by another context), it is put into sleep and moved out into a wait queue, forcing a context switch allowing the CPU to run other productive tasks. When the mutex becomes available, the task in the wait queue is woken up ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Kernel Development, Third Edition

Linux Kernel Development, Third Edition

Robert Love
Understanding the Linux Kernel

Understanding the Linux Kernel

Daniel P. Bovet, Marco Cesati
Linux Kernel Debugging

Linux Kernel Debugging

Kaiwan N. Billimoria

Publisher Resources

ISBN: 9781785883057Other