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-Thread: 103376,d87fcae02ce5c10a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Synchronizing on multiple distinict resources Date: Tue, 3 Aug 2004 10:56:04 +0200 Message-ID: References: <7ebaa24d.0408021054.4abc6e73@posting.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de WRxAfI94ttd+AkPrfMOAjAoY83hMzfUhGwYBbnrBcrdCFwcuw= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:2510 Date: 2004-08-03T10:56:04+02:00 List-Id: On 2 Aug 2004 11:54:30 -0700, Chad R. Meiners wrote: > Task and protected objects are great for synchronizing on resources that are > always grouped together. However, resources that must be grouped together > before they can be used, such as the chopsticks in the dining philosophers > problem, seem to require the developer to write their own resource > synchronization algorithm. Is there any standard method for synchronizing > on multiple resources in Ada 95? Standard pattern is to prioritize resources and to seize them in that order. One could also speculate about further Ada extensions towards: 1. multiple protected actions / rendezvous (to queue to two chopsticks) 2. extensible protected objects / tasks with multiple inheritance (to inherit a pair of chopsticks twice from a chopstick) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de