home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!seas.gwu.edu!lodhi
- From: lodhi@seas.gwu.edu (Fakhar Lodhi)
- Subject: Some Questions about protected records
- Message-ID: <1992Aug18.214029.13746@seas.gwu.edu>
- Originator: lodhi@seas.gwu.edu
- Sender: news@seas.gwu.edu
- Organization: George Washington University
- Date: Tue, 18 Aug 1992 21:40:29 GMT
- Lines: 46
-
- I have some questions about protected records and would greatly
- appreciate if some one could provide the answers. Thanks.
-
- Section 9.7 (Ada 9X Mapping Vol. II, Ver. 4.0, 24 Dec. 1991) gives the
- semantics of the execution of the protected operation as follows:
- (paragraphs 9-12)
-
- The actual execution of a protected operation is synchronized with other
- protected operations on the same protected record object, as follows:
-
- No two protected operations on the same protected record object
- may proceed concurrently, unless both ar functions.
-
- As the first step for an operation that is an entry call, the
- barrier condition is evaluated. If it yields FALSE, the call is queued,
- and does not proceed further until the barrier is reevluated and no longer
- yeilds FALSE.
-
- As the final step of a protected operation that is not a function,
- if any calls are queued, the barrier conditions are reevaluated. If the
- barrier of an entry with a queued call no longer evalutes to FALSE,
- one call on such a queue is selected as the next protected operation to be
- performed on the protected record. If more than one call is
- eligible, an implementation defined rule is used to select among them.
-
-
- Now I have the following questions.
-
- 1. What will happen to the procedure and function calls
- that cannot be executed immediately? Will they be queued or what?
- I think it is not mentioned anywhere in this document, or have I missed
- some thing?
-
- 2. Will the barriers for all entries be evaluated before making a selection
- (just like in the select statement), or is it left to the implementation?
-
- 3. As I understand, functions are provided in a protected record to allow
- concurrent read. Now assuming this is true, should they have a lower priority
- than procedure and entry operations when it comes to selecting a protected
- operation?
-
- Once again, I would really appreciate any one clearing this thing out for me.
- Thanks.
-
- Fakhar Lodhi
- lodhi@gwusun.gwu.edu
-