Memory Management in Zephyr
- Memory Managers
- Dynamic memory managers
- K_heap
- System heap
- Memory Slabs
- Memory Blocks
- Heap Listeners
- Stack Overflow detection
Exercise: |
Understand dynamic memory allocation in Zephyr |
Exercise: |
Display threads information and detect stack overflow |
Third Session
Resource Management
- Mutual Exclusion
- Critical Sections
- Mutexes
- Gatekeeper threads
- Atomic
- Lock-Free Data Structures
- SpinLocks
Exercise: |
Implement mutual exclusion between threads |
Synchronization Primitives
- Synchronization
- Semaphores
- The Readers/Writer Problem
- Condition variables
- Events and Event Groups
- Polling
Exercise: |
The producer-consumer problem, synchronize and avoid concurrent access problems |
Exercise: |
Understanding event bit group by synchronizing several threads |
Fourth Session
Data Passing
- Message Queues
- Pipes
- Queues
- Mailboxes
- Stacks
Exercise: |
Create a print gatekeeper thread using message queue |
Interrupt Management
- Threads and Interrupts
- Interrupts in zephyr
- Interrupts on ARM Cortex-M
- Handler thread
- Queue within an ISR
- Workqueue Threads
- Power Management
Exercise: |
Understand how to wait on multiple events and interrupt safe APIs |
Exercise: |
Understand how to pass data using Queues from an interrupt to a thread |
Exercise: |
Create and submit work items from interrupts to custom WorkQueue |
Software Timers
- Timers
- Defining a Timer
- Using a Timer Expiry Function
- Timer types
- One-shot timers
- Auto-reload timers
- Timer Commands
Exercise: |
Understand the use of one-shot and auto-reload timers |
|