home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / arch / 11982 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  2.2 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ucbvax!mtxinu!taniwha!paul
  2. From: paul@taniwha.UUCP (Paul Campbell)
  3. Newsgroups: comp.arch
  4. Subject: Re: <None> (Should be Open Systems, bloody NEWS system...)
  5. Message-ID: <1367@taniwha.UUCP>
  6. Date: 28 Dec 92 22:22:51 GMT
  7. References: <id.CG2W.R8A@ferranti.com> <1992Dec23.212321.26522@ryn.mro4.dec.com> <id.SQ3W.IB6@ferranti.com>
  8. Organization: Taniwha Systems Design
  9. Lines: 42
  10.  
  11. In article <id.SQ3W.IB6@ferranti.com> peter@ferranti.com (peter da silva) writes:
  12. >In article <1992Dec23.212321.26522@ryn.mro4.dec.com> Peter.Mayne@cao.mts.dec.com writes:
  13.  
  14. >And in UNIX the analog is a "signal". Now, a signal is a little "safer" than
  15. >an AST (at least as under RMX), in that it's guaranteed to run in your task
  16. >context.
  17.  
  18. Well VMS user-mode ASTs run just like signals. Actually each AST runs in
  19. it's tasks context - it's just that it's possible to create an AST for
  20. another task. Not much use in user mode (ie like signals) but very usefull as
  21. a kernel mechanism where you WANT something to happen in the context of
  22. another process.
  23.  
  24. I once implemented a complete port of Unix that ran within a single VMS process,
  25. the Unix kernel ran in a VMS process in supervisor mode, it ran multiple Unix
  26. processes in user mode, supervisor mode ASTs were used for Unix 'interrupts'
  27. (for example for input characters from terminals, disk IO completeions etc etc)
  28.  
  29.  
  30. >Much of the *C* run-time in *any* language is non-reentrant, and I would
  31. >be surprised if the VMS library was any better. If I get an AST while I'm
  32.  
  33. Yeah this is a major design flaw in the Unix/C world - an operating system
  34. that returns more than 1 thing from its system calls is implemented in
  35. a language that only returns 1 thing from a call. This doesn't mean that
  36. C shouldn't have been used for Unix - just that the API should have been 
  37. designed differently for example:
  38.  
  39.     (act_len, errno) = read(file, data, len);
  40.  
  41. probably should have been done as:
  42.  
  43.     errno = read(file, data, len, &act_len);
  44.  
  45.  
  46.     Paul
  47.  
  48. -- 
  49. Paul Campbell    UUCP: ..!mtxinu!taniwha!paul     AppleLink: CAMPBELL.P
  50. "Finally after much thought he tied a dollar bill to the top of the tree, it
  51. seemed to fit - after all it was the premier capitalist holiday, besides after
  52. the 'fall' of communism a star didn't seem appropriate anymore ..."
  53.