home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.21 / text0205.txt < prev    next >
Encoding:
Text File  |  1990-10-26  |  2.9 KB  |  67 lines

  1. Submitted-by: barmar@think.uucp (Barry Margolin)
  2.  
  3. In article <13642@cs.utexas.edu> chip@tct.uucp (Chip Salzenberg) writes:
  4. >According to brnstnd@kramden.acf.nyu.edu (Dan Bernstein):
  5. >>3. A unified namespace has not been tested on a large scale in the
  6. >>real world, and hence is an inappropriate object of standardization
  7. >>at this time.
  8. >"Advancement by invented standards" is an oxymoron, true.  Given that
  9. >POSIX seems to be intent on inventing *something*, though, I push for
  10. >a unified namespace.  Several people have described work with Unix (or
  11. >Unix-like) systems that keep everything in one namespace.  And surely
  12. >Plan 9 counts as "prior art."
  13.  
  14. Multics also has a unified namespace, although I suspect its interface
  15. would not be considered acceptable by most Unix folks (when users interface
  16. to it, the result looks a bit JCLish).
  17.  
  18. Rather than forcing everything into the file system hierarchy, Multics's
  19. generalized I/O system is based on dynamically linking to the procedure
  20. that knows how to open a particular type of I/O device.  The Multics
  21. equivalent to open() takes a character string, called an "attach
  22. description" that looks like a command line.  The first token in the string
  23. is transformed into the name of a subroutine, the dynamic linker is invoked
  24. to load the subroutine, and the remaining arguments are collected into an
  25. array of character strings that are passed as the argument list.  For
  26. instance, to open a file the call would look something like:
  27.  
  28.     fd = attach ("file /foo/bar/baz");
  29.  
  30. I've translated from Multics and PL/I style to Unix and C.  The Multics
  31. version also has an additional argument, to specify a label for the file
  32. descriptor, as there are commands to list and manipulate the attachments of
  33. the current process (note that on Multics the entire login session is a
  34. single process).
  35.  
  36. As another example, to attach to a TCP stream, the rsh command might do:
  37.  
  38.     fd = attach ("tcp think.com -port shell -privileged_local_port");
  39.  
  40. On Multics, there's a separate open() that is used after attach() (and,
  41. correspondingly, separate close() and detach()).  Attach() says what device
  42. (physical, as in a tape drive, or virtual, as in a file) you're attaching
  43. to, while open specifies how you're using it at any particular time (input
  44. vs output, file name on a labeled tape, etc.).  In the case of devices such
  45. as tape drives, this distinction allows keeping a tape drive reserved to
  46. the process while opening and closing individual files.
  47.  
  48. The user interface to this is the "io" command, with syntax like:
  49.  
  50.     io attach stdin file /foo/bar/baz
  51.     io open stdin -input
  52.  
  53. To fit this into Unix, you'd have to make a variant of > and < that is
  54. follwed by an attach description rather than a filename.  Actually, you
  55. could just use pipes, e.g.
  56.  
  57.     io attach stdout tape -drive 0 | dd ... | io attach stdin tcp ...
  58. --
  59. Barry Margolin, Thinking Machines Corp.
  60.  
  61. barmar@think.com
  62. {uunet,harvard}!think!barmar
  63.  
  64.  
  65. Volume-Number: Volume 21, Number 206
  66.  
  67.