home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 195 < prev    next >
Internet Message Format  |  1990-12-05  |  5KB

  1. From std-unix-request@uunet.uu.net  Wed Oct 10 18:59:47 1990
  2. Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP 
  3.     id AA02462; Wed, 10 Oct 90 18:59:47 -0400
  4. Posted-Date: 10 Oct 90 18:59:10 GMT
  5. Received: by cs.utexas.edu (5.64/1.77) 
  6. From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
  7. Newsgroups: comp.std.unix
  8. Subject: Re: Unified I/O namespace: what's the point?
  9. Message-Id: <13441@cs.utexas.edu>
  10. References: <13220@cs.utexas.edu> <13343@cs.utexas.edu> <13390@cs.utexas.edu> <13392@cs.utexas.edu>
  11. Sender: fletcher@cs.utexas.edu
  12. Organization: IR
  13. X-Submissions: std-unix@uunet.uu.net
  14. Date: 10 Oct 90 18:59:10 GMT
  15. Reply-To: std-unix@uunet.uu.net
  16. To: std-unix@uunet.uu.net
  17.  
  18. Submitted-by: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
  19.  
  20. I was not planning to post further on this topic, but Chip has provided
  21. some good arguments that deserve a proper rebuttal.
  22.  
  23. In article <13392@cs.utexas.edu> chip@tct.uucp (Chip Salzenberg) writes:
  24. > It is true that interactive use of UNIX, especially by programmers,
  25. > puts a lot of emphasis on the shell interface.  If such an environment
  26. > were all there were to Unix, then Dan's fd-centric view of the world
  27. > could possibly be useful.
  28.  
  29. The success of UNIX has proven how useful this ``fd-centric'' view is.
  30.  
  31. > To use Richard's example: when a hyperspace
  32. > shunt became available, its use would require only a change to the
  33. > shell source code and a recompilation.
  34.  
  35. You are making an unwarranted assumption here: that the shell *has* to
  36. handle all types of fd creation. It's convenient, of course, but by no
  37. means necessary. My TCP connectors, for example, are implemented outside
  38. the shell.
  39.  
  40. > However, the reality of modern Unix use is something else entirely:
  41. > pre-packaged utilities, usually available only as binaries, that for
  42. > practical purposes *cannot* be changed or replaced.  In this
  43. > environment, kernel features that require program customization are
  44. > unwieldy at best, useless at worst.  As long as shells fall into this
  45. > category -- "programs usually distributed as binaries" -- fd-centric
  46. > UNIX will never be practical.
  47.  
  48. This is also unfounded. My TCP connectors provide a counterexample to
  49. your hypothesis (that the shell must handle everything and hence be
  50. recompiled) and your conclusion (that fd-centric UNIX doesn't work).
  51. Any programming problem can be solved by adding a level of indirection.
  52.  
  53. > One could argue that binary-only distribution is evil and should be
  54. > stopped.
  55.  
  56. I do, in fact, think exactly that. But I will not use it as a basis for
  57. my arguments.
  58.  
  59. > Finally, filenames often are stored in places where no shell will ever
  60. > see them, such as program-specific configuration files.  So in Dan's
  61. > hypothetical fd-centric UNIX, we would have to either (1) pass such
  62. > filenames to the shell for interpretation, thus incurring a possibly
  63. > substantial performance hit; or (2) modify each program to understand
  64. > all the names the shell would understand.  In my opinion, neither of
  65. > these alternatives is viable.
  66.  
  67. On the contrary. syslog is a counterexample. While it is hardly as
  68. modular as I would like, it shows that (0) an fd-centric model works;
  69. (1) you do not need to invoke the shell or any other process, and you do
  70. not need to incur a performance hit; (2) you do not need to modify each
  71. program to understand everything that the syslogd program can. syslog
  72. has proven quite viable.
  73.  
  74. Provided that there is a message-passing facility available, and
  75. provided that it has sufficient power to pass file descriptors (which is
  76. true both under BSD's UNIX-domain sockets and under System V's streams),
  77. the syslog model will generalize to any I/O mechanism without loss of
  78. efficiency. open() can always be replaced by a write() to the facility
  79. followed by a file descriptor transfer. This is just as easy to do
  80. outside the kernel as inside the kernel; therefore it should be outside.
  81.  
  82. > To summarize:
  83. > A unified namespace has one great advantage: new types of objects are
  84. > immediately available to all programs -- even the programs for which
  85. > you do not have the means or the desire to modify and recompile.
  86.  
  87. To summarize: I believe I've provided counterexamples to each of your
  88. arguments and conclusions, and so I continue to maintain that a unified
  89. namespace is pointless. There is no need to recompile any programs just
  90. to provide a new I/O mechanism.
  91.  
  92. A unified namespace has several great disadvantages: 1. It provides a
  93. competing abstraction with file descriptors, hence adding complexity to
  94. the kernel, and giving vendors two different outlets for extensions.
  95. This will result in a confused system, where some features are available
  96. only under one abstraction or the other. 2. It is not clear that all
  97. sensible I/O objects will fit into one namespace. If the precedent of a
  98. unified namespace is established now, I/O objects that don't fit will be
  99. much harder to add later. 3. A unified namespace has not been tested on
  100. a large scale in the real world, and hence is an inappropriate object of
  101. standardization at this time.
  102.  
  103. ---Dan
  104.  
  105.  
  106. Volume-Number: Volume 21, Number 195
  107.  
  108.