home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!corton!cenaath.cena.dgac.fr!geant!bruniau
- From: bruniau@cenatls.cena.dgac.fr (Christophe Bruniau)
- Newsgroups: comp.lang.ada
- Subject: Re: Ada tasking rules and AST's...
- Message-ID: <1992Jul27.091219.22522@cenatls.cena.dgac.fr>
- Date: 27 Jul 92 09:12:19 GMT
- References: <1992Jul22.194130.10544@europa.asd.contel.com>
- Sender: news@cenatls.cena.dgac.fr
- Organization: Centre d'Etudes de la Navigation Aerienne
- Lines: 37
- Originator: bruniau@piano
-
-
- In article <1992Jul22.194130.10544@europa.asd.contel.com>, king@ssvax.gte.com (Larry King) writes:
- |> We are issueing VMS system calls from Ada. These system calls
- |> have associated AST's which I have defined and have gotten to work
- |> correctly. My question is how can I get Ada to do a rescheduling of the
- |> tasks to get this new entry to run. There is one process that takes
- |> some amount of time but if the system call has finished we would like
- |> the AST entry to run before this task normally finishes. Currently we
- |> issue a delay statement for the time
- |> DURATION'SMALL but this causes us to lose 10 milliseconds of time just
- |> to do the delay. It does cause VAX Ada to run the AST entry but we would like
- |> to avoid losing the 10 milliseconds if possible. Does VAX Ada (or any
- |> Ada for that matter) allow you to force an execution of the next entry on
- |> the queue before the current task has completely finished? I know the
- |> question is vague but I hope I am giving enough for someone to give me a
- |> reply. Thanks in advance...
- |>
- |> --
- |> Larry King
- |> GTE Government Systems, Needham, MA (617) 455-3384
- |> E-Mail : king%ssvax.dnet@get.com
-
- I think the best way to do this is to assign a higher priority to the
- task which handles the AST (this is coherent in that case because the task
- handles system interrupts). When the AST is issued, the executive should
- do a rescheduling, so the AST handling task would execute before the previous
- "current" one.
- This mechanism is valid only in the case of a preemptive executive (If my memory
- doesn't fail, this is the case of DEC-Ada, and it is enforced by Ada rules).
- This will prevent you from time wasting using delays, or CPU consuming using
- busy waiting (select ... else ...).
- Another way to help this mechanism work is to enable time-slicing, but it
- involves overhead and may cause you some tuning problems.
-
-
- Christophe BRUNIAU CENA Toulouse
- (+33) 62 25 95 56. bruniau@cenatls.cena.dgac.fr
-