Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Embedded Systems Engineering Curriculum
·
Module 8
Linux Kernel Concurrency and Memory
User/Kernel Space, Protection Rings, and System Calls with `strace`
Explain the separation between user space and kernel space, protection rings, and the flow of a system call using `strace`.
2
Spinlocks vs. Mutexes: Kernel Synchronization
Differentiate kernel synchronization primitives: spinlocks (for non-sleeping, short critical sections) vs. mutexes (for longer, sleepable sections).
3
IRQ-Safe Spinlocks for Data Protection
Apply IRQ-safe spinlock variants (`spin_lock_irqsave`) to protect data shared between process context and interrupt context.
4
Understanding RCU: Lock-Free Reads
Explain the fundamental concept of RCU (Read-Copy-Update) and identify use cases for lock-free read-side critical sections.
5
Memory Barriers: Compiler, Volatile, and Hardware
Distinguish between compiler barriers, `volatile` keyword semantics, and explicit hardware memory barriers for enforcing memory ordering.
6
`kmalloc` vs. `vmalloc`: Choosing the Right Allocator
Compare `kmalloc` (physically contiguous) vs. `vmalloc` (virtually contiguous) and choose the correct allocator for different driver scenarios.
7
Optimizing Multi-Core Performance with Per-CPU Variables
Use per-CPU variables to eliminate false sharing and cache line bouncing in performance-critical multi-core kernel code.
Real-time Scheduling & CPU Affinity in Linux
Configure Linux real-time scheduler policies (SCHED_FIFO, SCHED_RR) and apply CPU affinity for core binding.
Previous module
RTOS Fundamentals: Scheduling and Concurrency
Next module
Linux Device Driver Development