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,af960bc705aaf51b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-02 20:13:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news1.optus.net.au!optus!intgwlon.nntp.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: Complexity of protected objects References: <5ee5b646.0203021711.2c64c56d@posting.google.com> User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X) Message-ID: Date: Sun, 03 Mar 2002 04:13:35 GMT NNTP-Posting-Host: 144.132.91.90 X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 1015128815 144.132.91.90 (Sun, 03 Mar 2002 15:13:35 EST) NNTP-Posting-Date: Sun, 03 Mar 2002 15:13:35 EST Organization: BigPond Internet Services (http://www.bigpond.net.au) Xref: archiver1.google.com comp.lang.ada:20710 Date: 2002-03-03T04:13:35+00:00 List-Id: Robert Dewar wrote: > Remember that the key point about protected objects is the > ceiling priority protocol, which ensures that higher priority tasks > can still freely interrupt the lower priority tasks inside a PO with a > lower CP. Just to clarify - the sentence above seems to imply that a low priority task inside a PO can be forceably removed from the PO by a higher priority task that want the -same- PO. Of course this is impossible (if you want correct programs!). The reason you have POs is so that you can atomically modify the state of an object. If you kick a task out 1/2 through, the invariants for he PO (or the object it is protecting) could easily be left in a corrupt state. Ceiling priority protocal allows the high priority task to ensure it will be the -next- task to get access to the PO, and to ensure that low priority tasks "hurry up and get out of the way" when working inside a PO. On the other hand if the higher priority task is resources other than the PO used by the low priority tasks, then I agree. > Thus it is > quite reasonable to use complex PO's with a low CP for > communication between low priority tasks without any > danger of intefering with high priority tasks (even in > an implementation that has no locks). Another name for POs/semaphores are "bottlenecks". If you want to increase the natural parallelism of a program, you should make the code inside them as short as possible. Dale