Article View: comp.arch
Article #10919AST on UNIX
From: Bret Indrelee
Date: Thu, 24 Dec 1992 18:09
Date: Thu, 24 Dec 1992 18:09
46 lines
2741 bytes
2741 bytes
In article <1992Dec23.212321.26522@ryn.mro4.dec.com> Peter.Mayne@cao.mts.dec.com writes: > >In article <id.CG2W.R8A@ferranti.com>, peter@ferranti.com (peter da silva) writes: > >>That's right. The UNIX programming model. The point is that the UNIX API is >>very high level, and can be modified to provide any capability I've ever >>heard of without breaking it. There is NO excuse for any new operating >>system after about 1984 or 85 to use anything lower level. It increases the >>cost of software design, increases the cost of education and training, and >>decreases the amount of commonly available high quality software. > >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. BTW, if you really want to emulate it then set the priority of the AST handler above the scheduler (after locking it in memory, of coarse) so that it can have high priority. --- In my environment, ASTs and ASYNC I/O are the two best features of VMS. Event flags come close, but not quite as valuable. -Bret -- ------------------------------------------------------------------------------ Bret Indrelee | Nature Adores Chaos email: bret@technix.mn.org |
Technical Details
Message-ID:
<1992Dec24.180908.6772@technix.mn.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!spool.mu.edu!umn.edu!kksys.com!edgar!technix!bretReferences:
<1992Dec23.050719.4047@ryn.mro4.dec.com> <id.CG2W.R8A@ferranti.com> <1992Dec23.212321.26522@ryn.mro4.dec.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.arch Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!spool.mu.edu!umn.edu!kksys.com!edgar!technix!bret From: bret@technix.mn.org (Bret Indrelee) Subject: AST on UNIX Message-ID: <1992Dec24.180908.6772@technix.mn.org> Summary: How can you do AST on UNIX? Organization: Private System - Saint Paul, MN References: <1992Dec23.050719.4047@ryn.mro4.dec.com> <id.CG2W.R8A@ferranti.com> <1992Dec23.212321.26522@ryn.mro4.dec.com> Date: Thu, 24 Dec 1992 18:09:08 GMT Lines: 46