From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,82e0fdf9f4ca718f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-18 14:55:01 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!hub.org!hub.org!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A667815.CABC49B9@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Protected types References: <944hnf$3nh$1@nnrp1.deja.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 18 Jan 2001 22:54:12 GMT NNTP-Posting-Host: 158.252.123.82 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 979858452 158.252.123.82 (Thu, 18 Jan 2001 14:54:12 PST) NNTP-Posting-Date: Thu, 18 Jan 2001 14:54:12 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: supernews.google.com comp.lang.ada:4189 Date: 2001-01-18T22:54:12+00:00 List-Id: Adam Beneschan wrote: > > Question I: 9.5.1(4) says "A new protected action is not started on a > protected object while another protected action on the same protected > object is underway, unless both actions are the result of a call on a > protected function." > > Consider a case where Ceiling_Locking does not apply. Task T1 starts > a call on a protected function P.F1 (P is a protected object). While > P.F1 is still in progress, task T2 tries to call a protected procedure > P.P2. Clearly the call cannot start. So T2 has to wait until it can > call the procedure. Now, while P.F1 is still in progress and task T2 > is still waiting, task T3 calls another protected function P.F3. > Which of the following is true? > > (1) The call to P.F3 is started immediately, while T2 is still waiting > to call P.P2. > (2) Task T3 must wait until T1's call to P.F1, and then T2's call to > P.P2, are completed. > (3) It isn't defined by the language, and either (1) or (2) can > happen. Or, it would be defined by an implementation-defined > Locking_Policy. The ARM allows protected functions to proceed simultaneously, but does not require it. So the answer is that it's implementation defined. Another possibility is that T3 waits for T1's call to P.F1 to complete, then T3's call to P.F3 executes, followed by T2's call to P.P2. > Side question: My reading of the manual is that this situation cannot > occur on a single-processor system with Ceiling_Locking; is my > understanding correct? This is my understanding also. No task with a priority <= P's ceiling priority is allowed to run while T1's call to P.F1 is running. No task with a priority > P's ceiling priority may call any of P's operations. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail