comp.lang.ada
 help / color / mirror / Atom feed
From: John.Goodenough@SEI.CMU.EDU
Subject: Re: tasking and delays, again
Date: 16 Feb 88 15:47:15 GMT	[thread overview]
Message-ID: <8802161547.AA01746@cs.sei.cmu.edu> (raw)

Given that subtype PRIORITY includes the range 2..5 (so the pragmas have an
effect), task B should be interrupted approximately every 5 seconds and task A
should then execute until the next delay statement.  Even in a multiprocessor
implementation, one would expect task A to output its text every 5 seconds or
so.

An implementation might delay interrupting task B until the end of one of the
I/O statements if I/O is implemented by a task that runs at higher priority
than task A.

In my opinion, your test shows that the implementations do not support
preemptive scheduling (assuming the priority range includes 2..5), and
therefore, do not conform to the Standard (and AI-00032).

With respect to your initial question, if tasks A and B have the same
priority, task B can run forever once it gets control, assuming a uniprocessor
implementation.  On the other hand, if the uniprocessor implementation
supports time-slicing, then task A could occasionally get control.

The current validation tests do not, to my knowledge, test pragma PRIORITY, in
part because I hadn't interpreted 9.8 as requiring preemption.  Your test
gives an example of how this could be tested, however.

             reply	other threads:[~1988-02-16 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-02-16 15:47 John.Goodenough [this message]
  -- strict thread matches above, loose matches on Subject: below --
1988-02-16  5:52 Tasking and delays, again FACFELD
1988-02-16  4:40 Mike Feldman
1988-02-26 21:40 ` Barnacle Wes
replies disabled

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