Embedded and Real-Time Operating Systems for Small Devices – Part 1

After splitting the execution of a program image on several threads, and creating a mechanism to dispatch, suspend and resume them, we take the next step on our kernel development by studying and implementing synchronisation mechanisms, namely Sleep/WakeUp, Semaphores, Mutexes and Condition Variables.

With them we can make tasks to work together, by coordinating, enforcing mutual exclusion, and precedence on the access to shared resources – thus guaranteeing these operations to happen on the right sequence at the right time.

These mechanisms facilitate the development of complex applications, by effectively allowing the decomposition of a complex job on several tasks that cooperate.  Our kernel is taking shape.

*a more technical term for small is “constrained”

[DOWNLOAD/VIEW PDF]

A GitHub repo with the source code for the presented kernel can be found in:

https://github.com/antoniogiacomelli/ertos

Author: Antonio Giacomelli de Oliveira

Embedded Systems Engineer

Leave a comment