From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 18 Sep 92 01:11:45 GMT From: mcsun!uknet!yorkohm!minster!ken@uunet.uu.net Subject: Re: Ada delay Message-ID: <716778704.10211@minster.york.ac.uk> List-Id: Amir Michail (amichail@plg.uwaterloo.ca) wrote: : How is the Ada delay statement implemented? I suppose it uses a hardware : timer coupled with a clock server, but this would mean that the time : taken for a delay is unbounded (since we have to search an ordered list : of tasks). If this is true, then how can one possibly use it for : realtime scheduling of periodic tasks?? Usually there is a list of tasks waiting on a delay queue, which is regularly polled by a clock timer (1ms interval, say). Every time this interrupts the queue is examined for tasks which should now be placed in the run queue. The time delay isn't unbounded, since there is a maximum length of the queue. Furthermore, since tasks are periodic they will only need to be removed from the delay queue once per period. Knowing the period of each task gives the maximum overheads in a given time interval, and hence a bound on the overheads. There are other more sophisticated approaches. -- Ken Tindell Internet : ken@minster.york.ac.uk Computer Science Dept., Local FTP site: minster.york.ac.uk York University, Tel. : +44-904-433244 YO1 5DD, UK Fax. : +44-904-432708