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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!hao!ames!pasteur!ucbvax!SEI.CMU.EDU!John.Goodenough From: John.Goodenough@SEI.CMU.EDU Newsgroups: comp.lang.ada Subject: Re: tasking and delays, again Message-ID: <8802161547.AA01746@cs.sei.cmu.edu> Date: 16 Feb 88 15:47:15 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: 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.