comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Policies In Ada
Date: 1997/05/25
Date: 1997-05-25T00:00:00+00:00	[thread overview]
Message-ID: <dewar.864603073@merv> (raw)
In-Reply-To: 3381BCFB.167E@magellan.bgm.link.com


Samuel said

  <<it's a feature of the default task dispatching policy
  ("FIFO_Within_Priorities").  Tasks run until they hit a
  "task dispatching point">>

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.

  <<you get pot luck for task dispatching policy.  However,
  FIFO_Within_Priorities is still likely because it's easier
  to build than time-slicing.>>

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.





      reply	other threads:[~1997-05-25  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-07  0:00 Policies In Ada Stephen Cox
1997-05-08  0:00 ` Robert Dewar
1997-05-19  0:00 ` scott
1997-05-20  0:00   ` Samuel A. Mize
1997-05-25  0:00     ` Robert Dewar [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox