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

  1. From std-unix-request@uunet.uu.net  Tue Oct 16 11:04:32 1990
  2. Received: from cs.utexas.edu by uunet.uu.net (5.61/1.14) with SMTP 
  3.     id AA07065; Tue, 16 Oct 90 11:04:32 -0400
  4. Posted-Date: 15 Oct 90 20:26:04 GMT
  5. Received: by cs.utexas.edu (5.64/1.79) 
  6. From: tct!chip@cs.utexas.edu (Chip Salzenberg)
  7. Newsgroups: comp.std.unix
  8. Subject: Re: Names vs. fds -- it's a floor wax *and* a dessert topping
  9. Message-Id: <13642@cs.utexas.edu>
  10. References: <13390@cs.utexas.edu> <13392@cs.utexas.edu> <13441@cs.utexas.edu>
  11. Sender: fletcher@cs.utexas.edu
  12. Organization: Teltronics/TCT, Sarasota, FL
  13. X-Submissions: std-unix@uunet.uu.net
  14. Date: 15 Oct 90 20:26:04 GMT
  15. Reply-To: std-unix@uunet.uu.net
  16. To: std-unix@uunet.uu.net
  17.  
  18. Submitted-by: chip@tct.uucp (Chip Salzenberg)
  19.  
  20.  
  21. According to brnstnd@kramden.acf.nyu.edu (Dan Bernstein):
  22. >You are making an unwarranted assumption here: that the shell *has* to
  23. >handle all types of fd creation. It's convenient, of course, but by no
  24. >My TCP connectors, for example, are implemented outside the shell.
  25.  
  26. Yes, the shell can be let off the hook.  The point I was making,
  27. however, is still valid.  Without a unified namespace, new types of
  28. objects require *some* program to be written and/or modified.  And
  29. such programming isn't always available where it would be needed.
  30.  
  31. >> In Dan's hypothetical fd-centric UNIX, we would have to either
  32. >> (1) pass such filenames to the shell for interpretation, thus incurring
  33. >> a possibly substantial performance hit; or (2) modify each program to
  34. >> understand all the names the shell would understand.
  35. >
  36. >On the contrary. syslog is a counterexample.
  37.  
  38. If syslog is your best example of a zero-programming fd-centric
  39. service, then your position is mighty weak.  A program that uses a
  40. syslog-style service must make a call to one or more service-specific
  41. subroutines.  Thus, if a new server is brought on line, program
  42. modification will be required before the new server can be used.
  43.  
  44. And, of course, there is the vast number of programs that already
  45. exist and use open() exclusively.  Perhaps academics can blow off an
  46. installed base, but we commercial money-grubbers can't afford the
  47. luxury of modifying everything we've ever written -- even just once.
  48.  
  49. >... [syslog] shows that an fd-centric model works ...
  50.  
  51. Actually, it shows that fd's *with* a unified namespace are useful.
  52. How, pray tell, do you think openlog() gets its fd?  Via the *name*
  53. "/dev/log".  Syslog depends on the unified namespace (such as it is).
  54.  
  55. >(1) you do not need to invoke the shell or any other process, and you do
  56. >not need to incur a performance hit;
  57.  
  58. Granted.
  59.  
  60. >(2) you do not need to modify each program to understand everything
  61. >that the syslogd program can.  Syslog has proven quite viable.
  62.  
  63. True ... once the program uses syslog() or an equivalent service.
  64. But the binaries out there in the world don't.
  65.  
  66. >Provided that there is a message-passing facility available, and
  67. >provided that it has sufficient power to pass file descriptors (which is
  68. >true both under BSD's UNIX-domain sockets and under System V's streams),
  69. >the syslog model will generalize to any I/O mechanism without loss of
  70. >efficiency.
  71.  
  72. Aha!  So the New, Improved and Expanded syslog becomes the system-wide
  73. name-to-fd translator.  Furthermore, since new servers would require
  74. changes to all clients, the system-wide name-to-fd translator knows
  75. about all available object types.  I think I see the light.
  76.  
  77. But the server needs a name, if for no other reason than to provide a
  78. library binding.  My suggestion is -- can you guess? -- "open()".
  79.  
  80. It's deja vu all over again.
  81.  
  82. >This is just as easy to do outside the kernel as inside the kernel;
  83. >therefore it should be outside.
  84.  
  85. The server's location is irrelevant.  Its existence is not.
  86.  
  87. >A unified namespace has several great disadvantages: 1. It provides a
  88. >competing abstraction with file descriptors ...
  89.  
  90. As Peter da Silva said: Think synergy.  Names are desciptions of
  91. passive objects; fds are descriptions of active (open) objects.
  92. There's no competitition involved.
  93.  
  94. My idea of harmful competition is multiple abstractions for passive
  95. objects -- pathnames, struct sockaddrs and SysV IPC keys -- and for
  96. active objects -- fds, SysV IPC ids -- each of which has its own set
  97. of open/read/write/close analogues.  I therefore consider both SysV
  98. IPC and BSD sockets to be botches due to their competition with the
  99. Unix name/fd abstraction.  (I'd have a better opinion of sockets if
  100. the socket() call didn't exist and if connect() were named open().)
  101.  
  102. >2. It is not clear that all sensible I/O objects will fit into one
  103. >namespace.
  104.  
  105. It's clear to me.
  106.  
  107. >3. A unified namespace has not been tested on a large scale in the
  108. >real world, and hence is an inappropriate object of standardization
  109. >at this time.
  110.  
  111. "Advancement by invented standards" is an oxymoron, true.  Given that
  112. POSIX seems to be intent on inventing *something*, though, I push for
  113. a unified namespace.  Several people have described work with Unix (or
  114. Unix-like) systems that keep everything in one namespace.  And surely
  115. Plan 9 counts as "prior art."
  116. -- 
  117. Chip Salzenberg at Teltronics/TCT     <chip@tct.uucp>, <uunet!pdn!tct!chip>
  118.     "I've been cranky ever since my comp.unix.wizards was removed
  119.          by that evil Chip Salzenberg."   -- John F. Haugh II
  120.  
  121.  
  122. Volume-Number: Volume 21, Number 203
  123.  
  124.