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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,97ae587931c0f702 X-Google-Attributes: gid103376,public From: geert@fozzie.sun3.iaf.nl (Geert Bosch) Subject: Re: Ada Task priorities Date: 1997/01/27 Message-ID: <5chpnt$klc@fozzie.sun3.iaf.nl>#1/1 X-Deja-AN: 212538747 references: organization: La Calandre Infortunee newsgroups: comp.lang.ada Date: 1997-01-27T00:00:00+00:00 List-Id: Kevin Radke (kmradke@inav.net) wrote: Can one guarantee that if all 3 tasks are eligible for execution at the same time, that task a will finish it's work before task b begins to run, and task c will only run after both tasks a and b finish? Of course not! When having a machine with more than one processor they should run concurrently. It is perfectly legal for an implementation to make progress in all three tasks at the same time. Using priority as locking mechanism is very bad indeed and does not work in many cases. The ada83 RM seems to be pretty explicit about requiring "The highest priority eligible task must be executing at any given time", That some task is executing does not mean other tasks aren't. Even in a single processor environment there might be smart ways of making progress in both tasks at once and an implementation is certainly allowed to do that. My personal opinion is that using assumptions about priorities like this is just asking for trouble, but I thought I would get other people's opinions on this... It is asking for trouble indeed. When you want to task B to wait for task A, you should let task B wait for a rendez-vous with A. For example in task B you say accept Start do null end Start; and at the end of A you call B.Start. Regards, Geert from running you should let them make blocking calls to entries of -- E-Mail: geert@sun3.iaf.nl ``I think there is a world market for maybe five computers.'' Thomas Watson, chairman of IBM, 1943