home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / ada / 2201 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  2.4 KB

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