6.7 Chapter 6 Summary

[ Table of Contents ] Prev ] Chapter Overview ] [ Glossary/Index ]

As usual, we begin with some self-test questions.  (Answers are listed below in reverse order.)

Self-Test Questions
Click Q#-# to see Answer

Q6-1 Can a task be a library unit?
Q6-2 What is the rendezvous mechanism used for?
Q6-3 How many branches can a select statement have a) when it appears in a calling task, and b) when it appears in a called task?
Q6-4 Where can a terminate alternative appear?
Q6-5 How many kinds of protected operations can appear in a protected type or protected object declaration?
Q6-6 What distinguishes a protected entry body from a protected procedure body?
Q6-7 What is the effect of a requeue statement?

Key points of this chapter

Self-Test Answers

A6-7 A requeue statement places the calling task on a different entry queue.
A6-6 Every protected entry body has a barrier condition. A procedure body never has a barrier condition.
A6-5 There are three kinds of protected operations: procedures, functions and entries.
A6-4 A terminate alternative can appear only as the last alternative of a selective accept statement.
A6-3 A select statement in a calling task can have only two branches. In a called task a select statement can have any number of branches.
A6-2 Rendezvous is used to synchronize the actions of two tasks, and may also be used to transfer data between them.
A6-1 No, task units (and protected units) must always be nested in other units.

[ Click here to return to questions ]

Wrap-up discussion

This chapter has provided an introductory discussion of concurrency and synchronization, Ada style, along with example programs illustrating relevant language features and techniques. Key terms included in the Glossary/Index are:

abort accept entry
guard library unit nested unit
partition protected object protected operation
protected type protected unit queue
rendezvous requeue select
task task type terminate

This concludes the final chapter. The appendices contain reference material, mostly adapted from [ARM95].

[ Back to top of pagePrev ] [ To Appendix A ]