ABSTRACT

The main focus of this chapter is on classic inter-task synchronization and communication methods that rely on shared memory for data exchange among tasks, semaphores, and monitors in particular. Two more specialized synchronization objects, barriers and events, are also included in the discussion because, although they are less interesting from the theoretical point of view, they are still very useful in practice.

Before delving into this, the chapter introduces the fundamental concepts of race condition, critical region, and lock-based mutual exclusion. Two extremely important issues, priority inversion and deadlock, which may affect all lock-based inter-task synchronization and communication mechanisms, are also presented in this chapter.

To help readers get started faster on the topics they are most interested in, in this and the following chapter, we also steer the general theoretical discussion towards real-time execution concepts and their practical implementation by means of the RTEMS Classic and POSIX API.