ABSTRACT

This chapter contains an introduction to the RTEMS scheduling algorithms and synchronization devices suitable for symmetric multiprocessor and multicore systems. In particular, it describes how scheduling algorithms are configured and outlines how the MrsP and OMIP semaphore protocols work to tackle unbounded priority inversion in this kind of systems, and how they can be accessed through the RTEMS application programming interface.

The central part of the chapter discusses more advanced synchronization methods, namely, lock-free and wait-free synchronization, which have not been covered in Chapters 7 and 9, along with several practical implementation examples. The last section gives a short introduction to spinlocks, a kind of synchronization device often based on lock-free or wait-free techniques. Besides being useful by themselves, especially for synchronization between tasks and interrupt handlers, spinlocks are also a main building block of more complex synchronization devices, like semaphores.