Wed, 11 Aug 1999 14:26:32 -0400
At 01:33 PM 8/11/1999 , Harbaugh, John S wrote:
>We are running into this sort of problem when we are running a preemptive
tasking model on a Unix box that uses time slicing. The Ada code looks
slick, but the actual behavior is not per the design. The hidden time
slicing effectively changes the dynamic semantics of the language.
Unfortunately, it is not always possible to turn off the time-slicing. One
wonders how such an implementation can be validated for compliance with
Since the semantics are the same whether the same-priority tasks are
running completely in parallel (such as on a multiprocessor) or not, I can
not see any problem that could possibly be a result of time slicing. Could
you send some more information?
>On a related note, I am curious as to how the Ada run-time system
implements dispatching. Suppose task A is running at the highest software
priority and encounters a delay statement. It then yields the CPU to the
next runable task of highest priority. Okay so far, but what happens when
task A's delay expires? How does the run-time system know it should
preempt the running task? Do implementations rely on a timer interrupt, or
poll a list of delayed queues, or something else altogether? Perhaps one
of the implementation folks would care to shed a little light on a murky
They rely on a timer interrupt. If they are implemented on top of an
operating system, they rely on the OS services, such as condtimedwait,
which in turn relies on a timer interrupt.
Of course there may be some implementations, especially for multiprocessor
systems, that use some other method.
Draper Laboratory, MS 31
555 Technology Sq.
Cambridge, MA 02139, USA