home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / misc / discuss / 4665 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  29.9 KB

  1. Path: sparky!uunet!uunet.ca!canrem!telly!utzoo!torn!spool.mu.edu!caen!batcomputer!cornell!uw-beaver!micro-heart-of-gold.mit.edu!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!mib
  2. From: mib@geech.gnu.ai.mit.edu (Michael I Bushnell)
  3. Newsgroups: gnu.misc.discuss
  4. Subject: Re: Hurd?
  5. Date: 27 Jan 93 12:59:30
  6. Organization: MIT Artificial Intelligence Lab
  7. Lines: 592
  8. Distribution: usa
  9. Message-ID: <MIB.93Jan27125930@geech.gnu.ai.mit.edu>
  10. References: <1993Jan27.044604.26062@newshost.lanl.gov>
  11. NNTP-Posting-Host: geech.gnu.ai.mit.edu
  12. In-reply-to: ddk@beta.lanl.gov's message of Wed, 27 Jan 1993 04:46:04 GMT
  13.  
  14. In article <1993Jan27.044604.26062@newshost.lanl.gov> ddk@beta.lanl.gov (David D Kaas) writes:
  15.  
  16.    Is there still a gnu project to produce a unix like
  17.    operating system?  If so is there any information 
  18.    available on it?
  19.  
  20. The GNU Hurd, in combination with Mach, will provide a unix like
  21. operating system.
  22.  
  23. Here is some information that might whet people's curiosity.  Please
  24. don't ask me lots of questions about this; I don't have enough time.
  25. If people can understand the extant code reasonably well with only
  26. about two questions, and they have time to do work, there are a number
  27. of projects that can be done by other people to help out with the
  28. Hurd.
  29.  
  30.     -mib
  31.  
  32.  
  33.  
  34.         TOWARDS A NEW STRATEGY OF OPERATING SYSTEM DESIGN
  35.  
  36. PART 1 -- What we are doing
  37.  
  38. The fundamental purpose of an operating system is to enable a variety
  39. of programs to share a single computer efficiently.  Efficiency
  40. demands things such as memory protection, preemptively scheduled
  41. timesharing, and coordinated access to I/O peripherals.  In addition,
  42. operating systems can allow a variety of users to share a computer
  43. efficiently.  The same general areas apply here as well: preventing
  44. users from harming each other, enabling them to share without prior
  45. arrangement, and mediating access to physical devices.
  46.  
  47. On today's computer systems, implementing these goals usually involves
  48. a large program, called the kernel, which mediates all these
  49. exchanges.  Since this program must be accessible to all user
  50. programs, it becomes a natural place to add functionality to the
  51. system.  As time goes by, more and more gets added to the kernel,
  52. because the only model for interaction between processes is that of
  53. specific, individual services provided by the kernel.
  54.  
  55. The traditional system allows users to add components to the mammoth
  56. shared library "vmunix" only if they understand most of that library,
  57. and only if they have a privileged status within the system.  Testing
  58. these new components requires a much more painful edit-compile-debug
  59. cycle than other programs, and cannot be done while others are using
  60. the system.  Bugs usually cause fatal system crashes, further
  61. disrupting others' use of the system.  All of the kernel is usually
  62. non-pageable, [fn: There are systems with pageable kernels.  However,
  63. deciding what can be pageable is difficult and error prone.  As well,
  64. the mechanisms are usually quite complex, making them difficult to use
  65. by people wanting to add simple extensions.] further adding to the
  66. cost of adding functions to it.
  67.  
  68. Because of these restrictions, functionality which properly belongs
  69. "behind" the wall of the traditional kernel is usually left out of
  70. systems unless it is absolutely mandatory.  Many good ideas, best
  71. implemented with an open/read/write interface cannot be implemented
  72. because of the problems inherent in the monolithic nature of
  73. traditional systems.  Further, even for those with the endurance to
  74. implement such ideas, only those who are privileged users of their
  75. computers can do so.  The software copyright system, preventing
  76. unlicensed people from even reading the kernel source, only compounds
  77. the problem still more.
  78.  
  79. Some systems have addressed these difficulties.  Smalltalk-80 and the
  80. Lisp Machine both represent one method of getting around the problem.
  81. System code is not distinguished from user code; all of the system is
  82. accessible to the user, and can be changed as need be.  Both systems
  83. were built around languages that facilitated such easy replacement and
  84. extension, and were moderately successful.  These systems, however,
  85. were fairly poor at insulating users and programs from each other,
  86. thus failing one of the principle goals of operating system design.  
  87.  
  88. Most projects using the Mach 3.0 kernel today carry on the same
  89. tradition of operating system design.  The internal structure of the
  90. system has changed, but the same heavy barrier between user and system
  91. remains.  The single-servers, while fairly easy to construct, inherit
  92. quite naturally all the deficiencies of the monolithic kernels from
  93. which they came.
  94.  
  95. Most multi-server projects do somewhat better.  Much more of the
  96. system is pageable.  The system is more easily debugged, and testing
  97. of new system components need not interfere with other users.  But
  98. there is still a wall between the user and the system, and no user can
  99. cross that wall without special privilege.
  100.  
  101. The GNU Hurd, by contrast, is designed to make the area of "system"
  102. code as limited as possible.  Users are only required to communicate
  103. with the kernel; the rest of the system is replacable dynamically.
  104. Users can use whatever parts of the remainder of the system they want,
  105. and can add components themselves, easily, for other users to take
  106. advantage of.  No mutual trust need exist in advance for users to use
  107. each other's services, nor does the system become vulnerable by
  108. trusting the services of arbitrary users.
  109.  
  110. We have done this by identifying those components of the system which
  111. users must use in order to communicate with each other.  One of these
  112. is a mechanism responsible for identifying users' identities.  This
  113. program is called the authentication server.  Programs must
  114. communicate, each with an authentication server they trust, in order
  115. to establish each other's identities.  The other is a mechanism for
  116. establishing control over system components by the superuser, and
  117. global bookkeeping operations.  This server is called the process
  118. server.  
  119.  
  120. No user program needs to communicate with the process server at all;
  121. it is only necessary for users which require its services.  The
  122. authentication server is only necessary for programs which wish to
  123. establish their identity to another agent.  All remaining services in
  124. the system carry no special status.  This includes the network
  125. implementation, the filesystems, the exec mechanism (including
  126. setuid), and so forth.
  127.  
  128.  
  129.  
  130.         THE TRANSLATOR MECHANISM
  131.  
  132. The Hurd uses Mach ports primarily as methods for communicating
  133. between users and servers.  Each port implements a particular set of
  134. protocols, representing operations that can be undertaken on the
  135. underlying object represented by the port.  Some of the protocols
  136. specified by the Hurd are the I/O protocol, used for generic I/O
  137. operations; the file protocol, used for filesystem operations; the
  138. socket protocol, used for network operations; the process protocol,
  139. used for manipulating processes; and so forth.  
  140.  
  141. Most servers are accessed by opening files.  Normally, opening a file
  142. results in a port associated with that file, owned by the same server
  143. as the directory containing the file.  For example, a disk based
  144. filesystem would normally be serving a large number of ports, each
  145. representing an open file or directory.  When a new file is opened the
  146. server creates a new port, associates it with the file, and returns a
  147. send right to the user.
  148.  
  149. However, a file can have a "translator" associated with it.  In this
  150. case, rather than returning its own port referring to the contents of
  151. the file, the server executes a program, called the translator.  This
  152. program is provided a port to the actual contents of the file, and is
  153. then asked to return a port to the original user to complete the open
  154. operation.  
  155.  
  156. This mechanism is used quite obviously for mount.  A mount point would
  157. have a translator associated with it.  When a user opens the mount
  158. point, the translator, in this case, a program which understands the
  159. disk format of the mounted filesystem, is executed, and returns a port
  160. to the user.  Once the translator is started, it need not be run
  161. again, unless it dies; the parent filesystem retains a port to the
  162. translator to use in further requests.  Translators are guaranteed
  163. that new programs will not be started for further open operations.
  164.  
  165. Translators can be associated with files by the owner of the file,
  166. needing no additional permission.  As a result, any program can be
  167. specified as a translator.  Obviously the system will not work
  168. properly if the translator does not implement the file protocol
  169. correctly, or at all.  The system is so constructed, however, to cause
  170. an interruptible hang to be the worst possible result.  
  171.  
  172. One way to use translators, then, is to access hierarchically
  173. structured data using the file protocol.  All the complexity of the
  174. user interface to the ftp program, for example, is then removed.
  175. Users need only know that a particular directory represents FTP, and
  176. can use all the standard file manipulation commands, ls, cp, mv, and
  177. so forth, to access the remote system, rather than learning a new set.
  178. Similarly, the complexity of tar can be eased by a simple translator.
  179. [fn: Such transparent access to tar would not necessarily be cheap,
  180. though it would be convenient.]
  181.  
  182.  
  183.         GENERIC SERVICES
  184.  
  185. Another way to use translators is to use the filesystem as a
  186. rendezvous for interfaces which are not similar to files.  Consider a
  187. service which implements some version of the X protocol using Mach
  188. messages as an underlying transport.  For each X display, a file can
  189. be created with the appropriate program as its translator.  X clients
  190. would open that file.  At that point, most file operations (read and
  191. write, for example) would not be useful, but new operations
  192. (XCreateWindow or XDrawText) might become meaningful.  In this kind of
  193. case, the filesystem protocol is used further only to manipulate
  194. characteristics of the node used for the rendezvous.  The node need
  195. not support I/O operations, though it should reply to any such
  196. messages with a "message not understood" return code.  (If MiG stubs
  197. are used to demultiplex messages, this will happen automatically.)
  198.  
  199. This technique is used to contact most of the services in the Hurd
  200. which are not structured like hierarchical filesystems.  For example,
  201. the password server, which hands out authorization tags in exchange
  202. for passwords, is contacted this way.  Network protocol servers as
  203. well are contacted in this fashion.  Roland McGrath thought up this
  204. use of translators.
  205.  
  206.  
  207.         CLEVER FILESYSTEM PICTURES
  208.  
  209. The third common method of using translators in the Hurd is to present
  210. a filesystem-like view of another part of the filesystem, with some
  211. semantics changed.  For example, it might be nice to have a filesystem
  212. which cannot be changed, but records changed versions of its files
  213. elsewhere.  (This might be useful for source code management.)  A
  214. translator is available which presents "that directory" with all
  215. changes going "over there instead".  
  216.  
  217. Similarly, a translator is available which creates a directory which
  218. is a conceptual union of a number of other directories, with collision
  219. resolution rules of various sorts.  A variety of other ideas have been
  220. presented which do similar things.
  221.  
  222.  
  223.         WHAT THE USER CAN DO
  224.  
  225. None of these translators gain extra privilege by virtue of being
  226. hooked into the filesystem.  Translators run with the uid of the owner
  227. of the file being translated, and can only be set or changed by that
  228. owner.  The I/O and filesystem protocols are carefully designed to
  229. allow their use by mutually untrusting clients and servers.
  230.  
  231. Translators are just ordinary programs.  There are a variety of
  232. facilities in the GNU C library to make common sorts of translators
  233. easier to write.  Some translators which might appear to need special
  234. privilege are those which allow setuid exec or the password server
  235. referred to above.  In fact, these translators could be run by anyone.
  236. Only if they are set on a root-owned node, however, would they be able
  237. to successfully provide all their services.  This is analogous to
  238. letting any user call the reboot system call, but only honoring it if
  239. that user is root.
  240.  
  241.  
  242.         WHY THIS IS SO DIFFERENT
  243.  
  244. What this system organization lets users do is completely novel in the
  245. Unixoid world.  To this point, operating systems have kept huge
  246. portions of this functionality in the realm of system code, thus
  247. preventing its modification and extension, except in cases of extreme
  248. need.  Individual users cannot replace parts of the system in their
  249. programs no matter how much easier that would make their task, and
  250. system managers are loath to install random tweaks off the net into
  251. their kernels.
  252.  
  253. In our system, users can change almost all of the things which are
  254. decided for them in advance by traditional systems.  In combination
  255. with the tremendous control given by the Mach kernel over task address
  256. spaces and so forth, for the first time we have a system in which
  257. users will be able to replace parts of the system they dislike,
  258. without disrupting other users of the same system.
  259.  
  260. Most Mach-based operating systems to date have concentrated, instead,
  261. on implementing a wider set of the "same old" Unix semantics in a new
  262. environment.  By contrast, we are extending those semantics in ways
  263. that allow users to bypass or replace them, virtually arbitrarily.
  264.  
  265.  
  266. PART 2 -- What we are doing, in detail
  267.  
  268.  
  269.         THE AUTHENTICATION SERVER
  270.  
  271. One of the most central servers in the Hurd is the authentication
  272. server.  Each port to the authentication server identifies a user, and
  273. is associated by the authentication server with an "id block".  Each
  274. id block contains a set of user ids and a set of group ids.  Either
  275. set may be empty.  This server is not the same as the "password
  276. server" referred to above.
  277.  
  278. There are three services exported by the authentication server.
  279. First, the authentication server provides simple boolean operations on
  280. authentication ports.  Given a two authentication ports, the
  281. authentication server will provide a third port representing the union
  282. of the two sets of uids and gids.  
  283.  
  284. Second, the authentication server allows any user with a uid of zero
  285. to create an arbitrary authentication port.
  286.  
  287. Finally, the authentication server provides RPC's which allow mutually
  288. untrusting clients and servers to establish identity and pass initial
  289. information on each other.  This is crucial to the security of the
  290. filesystem and I/O protocols, for example.
  291.  
  292. Any user could write a program which implements the authentication
  293. protocol.  This does not, however, violate the security of the system.
  294. When a given service needs to authenticate a user, it communicates
  295. with its trusted authentication server.  If that user is using a
  296. different authentication server, the transaction will fail, and the
  297. server can refuse to communicate further.  Because, in effect, this
  298. forces all programs on the system to use the same authentication
  299. server, we have designed its interface to make any safe operation
  300. possible, and to include no extraneous operations.  (This is why
  301. passwords are implemented in a different server.)
  302.  
  303.  
  304.         THE PROCESS SERVER
  305.  
  306. The process server has undergone much change in the system design.
  307. Originally it was to be responsible for much of the mechanics of
  308. signal delivery, process creation and destruction, and so forth.  We
  309. realized, however, that virtually all of these features did not need
  310. to be in a global system server.  
  311.  
  312. The process server, in the final design, acts as an information
  313. categorization repository.  There are four main services supported by
  314. the process server.
  315.  
  316. First, the process server keeps track of generic host-level
  317. information not handled by the Mach kernel.  The hostname, the hostid,
  318. the system version, and so forth are maintained by the process server.
  319.  
  320. Second, the process server maintains the Posix notions of sessions and
  321. process groups, for the convenience of programs which wish to use
  322. Posix features.
  323.  
  324. Third, the process server maintains a one-to-one mapping between tasks
  325. and processes.  Every task is assigned a pid.  Processes can register
  326. a message port with the process server, which will then be given out
  327. to any other program which requests it.  The process server makes no
  328. attempt to keep these message ports private, so user programs need to
  329. implement whatever security they need themselves.  (The C Library,
  330. which normally implements reception of messages on the message port,
  331. provides convenient functions for doing so.)  Processes can tell the
  332. process server their current argv and envp values; the process server
  333. will then provide to those requesting it a vector of the arguments and
  334. environment for any process.  This is useful in writing ps-like
  335. programs, as well as making it easier to hide or change this
  336. information.  None of these features is mandatory.  Programs are free
  337. to disregard all of this if they wish, and never register themselves
  338. with the process server at all.  They will still have a pid assigned,
  339. however.
  340.  
  341. Finally, the process server implements "process collections", which
  342. are used to collect a number of process message ports at the same
  343. time.  Also, facilities are provided for converting between pids,
  344. process server ports, and Mach task ports, all the while ensuring the
  345. security of the ports managed.
  346.  
  347. It is important to stress that that the process server is optional.
  348. Because of restrictions in Mach, programs must run as root in order to
  349. identify all the tasks in the system, but given that, multiple process
  350. servers could co-exist, each with their own clients, giving their own
  351. model of the universe.  Those process server features which do not
  352. require root privileges to be implemented could be done as per-user
  353. servers, for those user programs which wish to do recordkeeping in
  354. that fashion.  The user's hands are not tied.
  355.  
  356.  
  357.         TRANSPARENT FTP
  358.  
  359. Transparent FTP is an intriguing idea whose time has come.  The
  360. popular ange-ftp package available for GNU Emacs makes access to FTP
  361. files virtually transparent to all the emacs file manipulation
  362. functions.  Transparent FTP does the same thing, but in a system wide
  363. fashion.  This server is not yet written; the details of its access
  364. remain to be fleshed out, and will doubtless change when we have
  365. experience using the server.
  366.  
  367. In a BSD kernel, a transparent FTP filesystem would be no harder to
  368. write than it is in the Hurd.  But mention the idea to a BSD kernel
  369. hacker, and the response is that "such a thing doesn't belong in the
  370. kernel".  In a sense, this is correct.  It violates all the layering
  371. principles of such a system to place such a thing in the kernel.  The
  372. unfortunate side effect, however, is that the design methodology
  373. (which is based on preventing users from changing things they don't
  374. like) is being used to prevent system designers from making things
  375. better.  
  376.  
  377. In the Hurd, there are no obstacles to doing transparent FTP.  A
  378. translator will be provided for the node /ftp.  The contents of /ftp
  379. will not be directly listable, though further subdirectories will.
  380. The will have a variety of possible formats.  If I want to access some
  381. files on uunet, for example, I might do
  382. `cd /ftp/ftp.uu.net:anonymous:mib@gnu'.  If I want to access some
  383. files on an account I have elsewhere, I might do 
  384. `cd /ftp/unmvax.cs.unm.edu:mike:my-password-here'.  Parts of this
  385. could be left out, and the transparent FTP program would read them
  386. from my .netrc file.  In the last case, this would allow me to do
  387. simply `cd /ftp/unmvax.cs.unm.edu'; the rest of the information is
  388. present in my .netrc file already.
  389.  
  390. There is no need to do a `cd' first--I can use any file commands I
  391. want.  If I want to implement RFC 1097 (the Telnet Subliminal Message
  392. Option), I can just type `more /ftp/ftp.uu.net/inet/rfc/rfc1097'.  I
  393. can use a copy command if I will need it frequently, or just directly
  394. load the file into my emacs.
  395.  
  396.  
  397.         FILESYSTEMS
  398.  
  399. We are implementing ordinary filesystems as well.  The initial release
  400. of the system will contain a filesystem upward compatible with the
  401. Fast File System as found in BSD 4.4.  In addition to the ordinary
  402. semantics, we will provide the recording of translators, thirty-two
  403. bit user ids and group ids, and a new id per file, called the "author"
  404. of the file, which can be arbitrarily set by the owner.  In addition,
  405. because users in the Hurd can have multiple uids, or even none, there
  406. is an additional set of permission bits providing access control for
  407. "unknown user" (no uids) as distinct from "known but arbitrary user"
  408. (some uids).  The latter category is the existing "world" category of
  409. file permissions.
  410.  
  411. We plan to implement the Network File System protocol, using the 4.4
  412. BSD implementation as a starting point.  We will also implement a
  413. log-structured filesystem, using the same ideas as the work at Sprite,
  414. but probably not the same format.  We may design our own network file
  415. protocol as well, or we may just extend NFS to rid it of deficiencies.
  416. We will also implement various "little" filesystems, such as the MSDOS
  417. filesystem, to help people move files between GNU and other operating
  418. systems on the same hardware.
  419.  
  420.  
  421.         TERMINALS
  422.  
  423. We will have an I/O server to implement the terminal semantics of
  424. Posix.  The C Library has features for keeping track of the
  425. controlling terminal and arranging to have the proper job control
  426. signals sent at the proper times, as well as obeying keyboard and
  427. hangup signals from the terminal driver.  
  428.  
  429. Programs will be able to insert the terminal driver into
  430. communications channels in a variety of ways.  Servers like rlogind,
  431. for example, will be able to insert the terminal protocol onto their
  432. network communication port.  Pseudo-terminals will not be necessary,
  433. though the will be provided for backward compatibility with older
  434. programs--no programs in GNU will depend on them.  
  435.  
  436. Nothing about the terminal driver is forced upon users.  The terminal
  437. driver allows a user to get at the underlying communications channel
  438. easily, and to either bypass the terminal driver on an as-needed
  439. basis, or entirely, or even substitute a different terminal
  440. driver-like program.  In the latter case, provided the alternate
  441. program implements the necessary interfaces, it will be used by the C
  442. Library exactly as if it were the ordinary terminal driver.
  443.  
  444. Because of this flexibility, the original terminal driver will not
  445. provide complex line editing features, restricting itself to the
  446. behavior found in Posix and BSD.  We plan, eventually, to have a
  447. readline-like terminal driver, which will provide complex line-editing
  448. features for those users who wish to use it.
  449.  
  450. The terminal driver will probably not support high-volume rapid data
  451. transmission (such as is required by UUCP or slip) very well.  Those
  452. programs, however, do not need any of its features, and will be
  453. modified to use the underlying Mach device ports for terminals, which
  454. do efficiently support moving large amounts of data.
  455.  
  456.  
  457.         EXECUTING PROGRAMS
  458.  
  459. The mechanics of implementing the execve call are distributed between
  460. three programs.  The library handles marshalling the argument and
  461. environment vectors.  It then sends a message to the file server
  462. holding the file to be executed.  The file server checks execute
  463. permissions, making whatever changes it desires in the exec call.  For
  464. example, if the file is marked setuid and the fileserver has the
  465. ability, it will change the user identification going to the new
  466. image appropriately.  The file server also decides if programs which
  467. had access to the old task should continue to have access to the new
  468. task.  If the file server is augmenting permissions, or executing an
  469. unreadable image, for example, then the exec needs to take place in a
  470. new Mach task to maintain security.  (The process server contains some
  471. special features to allow the new task to keep the pid of the old task
  472. in this case, thus preserving Posix semantics.)
  473.  
  474. After deciding the policy associated with the new image, the
  475. filesystem calls the exec server to load the task.  The exec server,
  476. written using the GNU BFD (Binary File Descriptor) library, loads the
  477. image.  BFD supports a large number of object file formats; almost any
  478. object file format it supports will be executable.  The exec server
  479. also recognizes scripts starting with `#!' and does the right thing
  480. for them.  
  481.  
  482. It was thought that it would be nice to make it easy for users to have
  483. their own exec servers.  Roland McGrath thought of the following
  484. technique.  The standard exec server also looks at the environment of
  485. the new image; if it contains a variable EXEC_SERVERS then it uses the
  486. programs specified there as exec servers instead of the system
  487. default.  (This is, of course, not done for execs that the file server
  488. has requested be kept secure.)
  489.  
  490. The new image starts running in the C Library, which sends a message
  491. to the exec server to get the arguments, environment, and other state
  492. (umask, current directory, etc.).  None of this additional state is
  493. special to the file server or the exec server; if programs wish, they
  494. can use it in a different manner than the C Library.
  495.  
  496.  
  497.         NEW PROCESSES
  498.  
  499. The fork call is implemented almost entirely in the C Library.  The
  500. new task is created by Mach kernel calls.  The C Library arranges to
  501. have its image inherited properly.  The new task is registered with
  502. the process server (though this is not mandatory).  The C Library
  503. provides vectors of functions to be called at fork time: one vector to
  504. be called before the fork, one after in the parent, and one after in
  505. the child.  This should not be used to replace the normal sequence of
  506. calling fork; it is intended for libraries which need to close ports
  507. or clean up lock state before a fork occurs.  The library will
  508. implement both fork calls specified by the draft Posix.4a (the threads
  509. extension to the real-time extension).
  510.  
  511. Nothing forces the user to create new tasks this way.  If a program
  512. wants to use almost the normal fork, but with some special
  513. characteristics, then it can do so.  Hooks will be provided by the C
  514. Library; in addition, the function can even be completely replaced if
  515. desired.  None of this is possible in a Unix system.
  516.  
  517.  
  518.         ASYNCHRONOUS MESSAGES
  519.  
  520. As mentioned above, the process server maintains a "message port" for
  521. each task registered with it.  These ports are public, and are used to
  522. send asynchronous messages to the task.  Signals, for example, are
  523. sent to the message port.  The signal message also provides a port as
  524. an indication that the sender should be trusted to send the signal.
  525. The C Library maintains a variety of ports in a table, each of which
  526. identifies a set of signals that can be sent by anyone who posesses
  527. that port.  For example, if the user possess the task's kernel port,
  528. it is allowed to send any signal.  If the user possesses a special
  529. "terminal id" port, it is allowed to send the keyboard and hangup
  530. signals.  Users can add arbitrary new entries into the C Libraries
  531. signal permissions table.
  532.  
  533. When a process's process group changes, the process server will send
  534. it a message indicating the new process group.  In this case, the
  535. process server proves its authority by providing the task's kernel
  536. port.  
  537.  
  538. The library also implements messages to add and delete uids currently
  539. used by the process.  If new uids are sent to the program, the library
  540. adds them to its current set, and then exchanges message with all the
  541. I/O servers it knows about, proving to them its new authorization.
  542. Similarly, uids can be deleted with a message.  In the latter case,
  543. the caller must provide the process's task port.  (You can't harm a
  544. process by giving it extra permission, but you can harm it by taking
  545. permission away.)  We will provide user programs to send these
  546. messages to processes.  This will enable the `su' command to cause all
  547. the programs in your current login session to gain a new uid, rather
  548. than spawn a subshell.
  549.  
  550. The library will allow programs to add asynchronous messages they wish
  551. to recognize, as well as prevent recognition of the standard set.
  552.  
  553.  
  554.         MAKING IT LOOK LIKE UNIX
  555.  
  556. The C Library will implement all the calls from BSD and Posix, as well
  557. as some obvious extensions to them.  This enables users to replace
  558. those calls they dislike, or bypass them entirely, whereas in Unix,
  559. the calls must be used "as they come", with no alternatives possible.
  560.  
  561. On some environments, we will support binary compatibility as well.
  562. This works by building a special version of the library.  This is then
  563. loaded somewhere in the address space of the process.  (On, a Vax, for
  564. example, it would be tucked in above the stack.)  A feature of Mach,
  565. called system call redirection is then used to trap Unix system calls
  566. and turn them into jumps into this special version of the library.
  567. (On almost all machines, the cost of such a redirection is very small;
  568. this is a highly optimized path of Mach.  On a 386 it's about two
  569. dozen instructions.)  This is only slightly worse than a simple
  570. procedure call.
  571.  
  572. Many features of Unix, such as signal masks and vectors, are handled
  573. completely by the library.  This makes such calls significantly
  574. cheaper than in Unix.  It is now reasonable to use sigblock
  575. extensively to protect critical sections, rather than seeking out some
  576. other, less expensive method.
  577.  
  578.  
  579.         NETWORK PROTOCOLS
  580.  
  581. We are writing a library that will make it very easy to port 4.4 BSD
  582. protocol stacks into the Hurd.  This will enable operation, virtually
  583. for free, of all the protocols supported by BSD.  Currently, this
  584. includes the CCITT protocols, the TCP/IP protocols, the Xerox NS
  585. protocols, and the ISO protocols.
  586.  
  587. For maximal performace, some work would be necessary to take advantage
  588. of Hurd features that provide for very high speed I/O.  Generally, for
  589. most protocols, this would require some thought, but not too much
  590. time.  We intend to spend effort making the TCP/IP protocols run as
  591. efficiently as possible.
  592.  
  593. As an interesting example of the flexibility of the Hurd design,
  594. consider the case of IP trailers, used extensively in BSD for
  595. performance.  While the Hurd will be willing to send and receive
  596. trailers, it will gain fairly little advantage in doing so, because
  597. there is no requirement that data be copied *ever*, so avoiding copies
  598. for page-aligned data is not important.
  599.  
  600.  
  601. --
  602. Michael I. Bushnell      |     Watch, for you do not know when the master of 
  603. +1 617 625 4518 (H)     -+-    the house will come, in the evening, or at
  604. +1 617 253 8568 (W)      |     midnight, or at cockcrow, or in the morning, 
  605. mib@gnu.ai.mit.edu       |     lest he come suddenly and find you asleep.
  606.