First day
Tasks and scheduling in embedded systems
- Tasks and task descriptors
- Context switch
Exercise: |
Write a context switch routine |
- Task scheduling and preemption
- Tick based or tickless scheduling
- Scheduling systems and schedulability proofs
- Fixed priority scheduling
- RMA and EDF scheduling
- Adaptive scheduling
Exercise: |
Write a simple, fixed priority, scheduler |
Interrupt management in real time systems
- Need for interrupts in a real time system
- Time interrupts
- Device interrupts
- Level or Edge interrupts
- Hardware and software acknowledge
- Interrupt vectoring
Exercise: |
Write a basic interrupt manager |
- Interrupts and scheduling
Exercise: |
Extend the scheduler to also support real-time round-robin scheduling |
Multicore interactions
- Cache coherency
- Snooping basics
- Snoop Control Unit: cache-to-cache transfers
- MOESI state machine
- Memory Ordering and Coherency
- ut-of-order accesses
- Memory ordering
- Memory barriers
- DMA data coherency
- Multicore data access
- Read-Modify-Write instructions
- Linked-Read/Conditional-Write
- Multicore synchronization
- Spinlocks
- Inter-Processor Interrupts
Exercise: |
Writing a spinlock implementation |
Second day
Multicore scheduling
- Multicore scheduling
- Assigning interrupts to processors
- Multi-core scheduling
- Multicore optimization
- Cache usage optimization
- Avoiding false sharing
- Avoiding cache spilling
Exercise: |
Study of a multi-core scheduler |
Synchronisation primitives
- Waiting and waking up tasks
- Semaphores
Exercise: |
Implement Semaphores by direct interaction with the scheduler |
- Mutual exclusion
- Spinlocks and interrupt masking
- Mutexes or semaphores
Exercise: |
Implement the mutex mechanism |
- Recursive and non-recursive mutexes
Exercise: |
Check proper nesting of mutexes and recursive/non-recursive use |
- The priority inversion problem
- Priority inheritance (the automagic answer)
- Priority ceiling (the design centric answer)
Exercise: |
Implement a priority ceiling mechanism |
- Mutexes and condition variables
Exercise: |
Add Condition variable support to the mutex mechanism |
Third day
Avoiding sequencing problems
- The various sequencing problems
- Uncontrolled parallel access
Exercise: |
The producre-consumer problem, illistrating (and avoiding) concurrent access problems |
- Deadlocks
- Livelocks
- Starvation
Exercise: |
The philosophers dinner problem, illustrating (and avoiding) deadlock, livelock and starvation |
Osek/VDX tasking architecture
- Task management
- Basic tasks
- Extended tasks
- Scheduling policies
- Task activation and termination
- Interrupt processing
- Events
- Resources
Autosar and Multicore programming
- Autosar multicore architecture
- Autosar Locatable Entities
- Enhancements to the OSEK scheduling
- Autosar spinlocks
- The Inter OS-Application Communicator
- Migrating Autosar application to multicore