TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-type:
text/plain; charset="us-ascii"
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Roger Racine <[log in to unmask]>
Date:
Wed, 11 Aug 1999 14:26:32 -0400
In-Reply-To:
MIME-version:
1.0
Reply-To:
Roger Racine <[log in to unmask]>
Parts/Attachments:
text/plain (40 lines)
At 01:33 PM 8/11/1999 , Harbaugh, John S wrote:
>       <snip>
>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
annex D.
>

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
subject.
>

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.

Roger Racine
Draper Laboratory, MS 31
555 Technology Sq.
Cambridge, MA 02139, USA
617-258-2489

ATOM RSS1 RSS2