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
3 - Inter-process communication
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 major difficulties associated with concurrent programming arise from process interaction. Rarely are processes as independent of one another as they were in the simple example of the previous chapter. One of the main objectives of embedded systems design is to specify those activities that should be represented as processes (that is, active entities and servers), and those that are more accurately represented as protected entities (that is, resources). It is also critically important to indicate the nature of the interfaces between these concurrent objects. This chapter reviews several historically significant inter-process communication primitives: shared variables, semaphores, monitors and message passing. Before considering language primitives, however, it is necessary to discuss the inherent properties of inter-process communication. This discussion will be structured using the following headings:
Data communication;
Synchronisation;
Deadlocks and indefinite postponements;
System performance, correctness and reliability.
These are the themes that have influenced the design of the Ada tasking model.
As this model directly represents active and protected entities, there are two main forms of communication between active tasks:
direct – task-to-task communication;
indirect – communication via a protected resource.
Both these models are appropriate in Ada programs. In the following sections, however, we start by considering the problems of communicating indirectly by the use of only passive entities.
Data communication
The partitioning of a system into tasks invariably leads to the requirement that these tasks exchange data in order for the system to function correctly. For example, a device driver (a process with sole control over an external device) needs to receive requests from other processes and return data if appropriate.
- Type
- Chapter
- Information
- Concurrent and Real-Time Programming in Ada , pp. 31 - 54Publisher: Cambridge University PressPrint publication year: 2007