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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5dc0152fc17e5f2c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Sender: malo@0x5358ef10.boanxx18.adsl-dhcp.tele.dk Newsgroups: comp.lang.ada Subject: Re: Deadlock resolution References: From: Mark Lorenzen Date: 26 Jul 2004 09:46:48 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: TDC Totalloesninger NNTP-Posting-Host: 83.88.239.16 X-Trace: 1090827881 dtext02.news.tele.dk 174 83.88.239.16:10931 X-Complaints-To: abuse@post.tele.dk Xref: g2news1.google.com comp.lang.ada:2390 Date: 2004-07-26T09:46:48+02:00 List-Id: "Nick Roberts" writes: > I would appreciate answers from people who have experience > of real life multi-tasking software written in Ada. > > Does this software tend to have deadlock detection and/or > resolution mechanisms explicitly programmed in Ada, or is > it expected that deadlocks will be managed elsewhere (for > example, in the operating system or run time system or > RTMS or whatever)? I would say that it should be managed elsewhere preferably by hardware. > Alternatively, have you ever come across software written > in Ada using techniques to eliminate deadlock (for example, > a lock ordering strategy)? Use one of the normal analysis methods to analyse if your tasks always meet their deadlines f.x. the Rate Monotonic Analysis method (see "Meeting Deadlines in Hard Real-Time Systems" ISBN: 0-8186-7406-7) together with the Ravenscar Ada profile. > Which approach do you think is best, in reality (handle in > Ada, handle elsewhere, eliminate altogether)? Eliminate deadlocks in the first place is the best solution. Everything else is just a hack trying to fix a bad design. > I would appreciate brief descriptions of how deadlock > detection and/or resolution is performed in real Ada > programs (where it is performed in Ada). In some systems, a watchdog is monitoring the CPU to detect if it halts and then resets the system. But again, avoiding deadlocks is better than resetting the system. > Thanks, > Nick Roberts Regards, - Mark Lorenzen