Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 The nature and uses of concurrent programming
- 3 Inter-process communication
- 4 Task types and objects
- 5 The rendezvous
- 6 The select statement and the rendezvous
- 7 Protected objects and data-oriented communication
- 8 Avoidance synchronisation and the requeue facility
- 9 Exceptions, abort and asynchronous transfer of control
- 10 Object-oriented programming and tasking
- 11 Concurrency utilities
- 12 Tasking and systems programming
- 13 Scheduling real-time systems – fixed priority dispatching
- 14 Scheduling real-time systems – other dispatching facilities
- 15 Timing events and execution-time control
- 16 Real-time utilities
- 17 Restrictions, metrics and the Ravenscar profile
- 18 Conclusion
- References
- Index
8 - Avoidance synchronisation and the requeue facility
Published online by Cambridge University Press: 10 December 2009
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 The nature and uses of concurrent programming
- 3 Inter-process communication
- 4 Task types and objects
- 5 The rendezvous
- 6 The select statement and the rendezvous
- 7 Protected objects and data-oriented communication
- 8 Avoidance synchronisation and the requeue facility
- 9 Exceptions, abort and asynchronous transfer of control
- 10 Object-oriented programming and tasking
- 11 Concurrency utilities
- 12 Tasking and systems programming
- 13 Scheduling real-time systems – fixed priority dispatching
- 14 Scheduling real-time systems – other dispatching facilities
- 15 Timing events and execution-time control
- 16 Real-time utilities
- 17 Restrictions, metrics and the Ravenscar profile
- 18 Conclusion
- References
- Index
Summary
The models of synchronisation discussed in the previous four chapters have the common feature that they are based on avoidance synchronisation. Guards or barriers are used to prevent rendezvous and task-protected object interactions when the conditions are not appropriate for the communications event to start. Indeed, one of the key features of the tasking model is the consistent use of avoidance to control synchronisation. The use of guards and barriers represents a high-level abstract means of expressing and enforcing necessary synchronisations; and as such they can be compared favourably with the use of low-level primitives such as semaphores or monitor signals (see Chapter 3). This chapter starts by giving a more systematic assessment of avoidance synchronisation in order to motivate the requirement for ‘requeue’. It then describes the syntax and semantics of the requeue statement and gives examples of its use.
The need for requeue
Different language features are often compared in terms of their expressive power and ease of use (usability). Expressive power is the more objective criterion, and is concerned with the ability of language features to allow application requirements to be programmed directly. Ease of use is more subjective, and includes the ease with which the features under investigation interact with each other and with other language primitives.
In her evaluation of synchronisation primitives, Bloom (1979) used the following criteria to evaluate and compare the expressive power and usability of different language models.
- Type
- Chapter
- Information
- Concurrent and Real-Time Programming in Ada , pp. 163 - 194Publisher: Cambridge University PressPrint publication year: 2007