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