home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / arch / 12198 < prev    next >
Encoding:
Internet Message Format  |  1993-01-09  |  2.5 KB

  1. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!mcsun!dxcern!dscomsa!zeus02.desy.de!hallam
  2. From: hallam@zeus02.desy.de (Phill Hallam-Baker)
  3. Newsgroups: comp.arch
  4. Subject: Re: AST on UNIX
  5. Message-ID: <C0LyA6.IHL@dscomsa.desy.de>
  6. Date: 9 Jan 93 22:25:17 GMT
  7. References: <1992Dec24.180908.6772@technix.mn.org> <1992Dec28.154934.25582@decvax.dec.com>
  8. Sender: usenet@dscomsa.desy.de (usenet)
  9. Reply-To: Hallam@zeus02.desy.de
  10. Organization: Deutsches Elektronen Synchrotron, Experiment ZEUS bei HERA
  11. Lines: 47
  12.  
  13. In article <1992Dec28.154934.25582@decvax.dec.com>, simon@mallard.edec.locus.com
  14. (simon R) writes:
  15.  
  16. |>: >OK, try this. VMS has something called an AST (Asynchronous System Trap)
  17. |>which
  18. |>: >is similar to a user-mode interrupt. This may occur at any time: for
  19. |>instance,
  20. |>: >an asynchronous I/O can call an AST routine when the I/O completes. When
  21. |>the
  22. |>: >AST routine completes, control returns to the code that was executing at
  23. |>the
  24. |>: >time the AST occurred. (The analogy in NT is the APC, or Asynchronous
  25. |>: >Procedure Call.)
  26. |>: >
  27. |>: >Now, much of the run-time stuff in UNIX is non-reentrant. In particular,
  28. |>the 
  29. |>: >use of errno springs to mind. If the AST (or APC) was introduced into the
  30. |>: >UNIX model, how can I use these non-reentrant routines safely in an AST
  31. |>: 
  32. |>: While you are at it, don't forget to include a separate 32-bit value
  33. |>: passed to the AST.  The AST is fully queue'd, and if you send 32 ASTs
  34. |>: before the application executes it's handler the application will still
  35. |>: see ALL the ASTs with their separate 32-bit value.
  36. |>: 
  37. |>: If you can make this work, now port it to AIX, SunOS, Solaris, Ultrix,
  38. |>: IRIX, and HP-UX.  Those are the only environments I currently would like
  39. |>: it on, I'm sure there would be more within a few months.
  40. |>: 
  41. |>Concurrent Computer (for whom I used to work) have had AST capability
  42. |>in their real-time version of Unix (based on System V) since (as
  43. |>MASSCOMP) their first product shipped some ten years ago.
  44. |>As I recall, error status of the I/O operation was indeed passed as a
  45. |>parameter
  46. |>to the AST routine. It's major use was to overlap real time data input
  47. |>with output to disk or whatever. ASTs could be prioritized, buffers 
  48. |>locked in memory, everything that you needed to do real-time data collection.
  49. |>
  50.  
  51. The AST functionality is in any case to a large degree superceeded by POSIX
  52. threads. The addition of threads to VMS has been one of the most useful of the
  53. recent additions. Of course if you have ASTs then it is quite easy to add on the
  54. threads.
  55.  
  56.  
  57. --
  58.  
  59. Phill Hallam-Baker
  60.