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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!water!watmath!clyde!att-cb!att-ih!pacbell!ames!necntc!linus!philabs!micomvax!zap!fortin From: fortin@zap.UUCP (Denis Fortin) Newsgroups: comp.lang.ada Subject: Re: INFO-ADA Digest V88 #47 Message-ID: <415@zap.UUCP> Date: 7 Mar 88 15:48:27 GMT References: <8802202149.AA07429@ajpo.sei.cmu.edu> Reply-To: fortin@zap.UUCP (0000-Denis Fortin) Organization: (none), Montreal QC, Canada Posted: Mon Mar 7 10:48:27 1988 List-Id: In article <8802202149.AA07429@ajpo.sei.cmu.edu> PETCHER%SVDSD@eg.ti.COM writes: > Mike Linnig asks: > > Is there a value to having multiple priorities even if we don't > > have preemptive scheduling? > > My answer is an emphatic YES. [...] in an embedded, real-time system > tasks can be (and should be) designed to cooperate. This means, among > other things, a task should not execute indefinitely, and in fact should > be designed to complete its intended function within a predictable > period of time. Well, I agree that non-preemptive prioritized task scheduling makes sense for some applications. But in order for it to work, a task has to be able to explicitly return the control to the "scheduler" when it has expended its time slice. The only unobtrusive way I can see to force a rescheduling event to occur in Ada is a "delay 0.0" statement. Unfortunately, I'm told that some compilers treat this as a no-op and simply ignore it. Has anybody encountered such a compiler? If so, is it legal? (section 9.6 of the LRM does say about the delay statement: "The execution of a delay statement evaluates the simple expression, and suspends further execution of the task that executes the delay statement [...]") -- Denis Fortin | fortin@zap.UUCP CAE Electronics Ltd | philabs!micomvax!zap!fortin The opinions expressed above are my own | fortin%zap.uucp@uunet.uu.net