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,c9de359b1cbd21d6 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Policies In Ada Date: 1997/05/25 Message-ID: #1/1 X-Deja-AN: 243900482 References: <01bc5b23$8e4375e0$190000c2@Stephen.ers.ie> <5lqke4$dkv@hacgate2.hac.com> <3381BCFB.167E@magellan.bgm.link.com> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-05-25T00:00:00+00:00 List-Id: Samuel said <> That's wrong. The default dispatching policy is not specified by the RM. You only get the above behavior if you specify pragma Dispatching_Policy (FIFO_Within_Priorities), and your compiler supports this pragma. <<-- a same-priority task CAN'T interrupt the current task. To get time-slicing, you must use a Task_Dispatching_Policy pragma (AND the compiler must support a time-slicing policy, which is not required).>> That's potentially misleading, since it implies that another equal priority task cannot execute -- that's of course not true on multi-processors. What is true is that a priority X task will not get preempted by another priority X task. <> That's likely wrong. Most Ada runtime systems are likely to be built over the underlying threads, and typically these OS level threads *do* support time slicing, so I would say that time slicing is more likely if you are using a general purpose compiler in default mode on top of an OS. The new version of GNAT on Solaris for example will give system threads and time slicing as the default dispatching policy, but if you use FIFO_Within_Priorities, then we use our own completely Annex_D accurate threads package which does not give time slicing <<** For Ada 83 ** I don't remember the rules for same-priority tasks (if any).>> Not surprising, there are no rules governing this in Ada 83, i.e. the behavior in Ada 83 is equivalent to Ada 95 in the absence of a Dispatching_Policy pragma -- undefined.