ABSTRACT

This chapter presents the internal structure of FreeRTOS. It describes the features and the applications programming interface of the same real-time operating system. The chapter discusses the internal structure of a couple of Linux real-time extensions. It explores the supporting data structures used by the FreeRTOS task scheduler and its main interprocess communication mechanism, the message queue. The chapter shows that, at a closer look, even the real-world implementation of a task context switch—arguably one of the most secluded operating system mechanisms—is not as exotic as it may seem when the concept is contemplated from far away. The chapter concludes the discussion of how a simple operating system can be ported from one architecture to another, and what an HAL must contain. Due to lack of space, the presentation is far from being exhaustive but can be used as a starting point for readers willing to adapt an operating system to the hardware architecture they are working on.