1
0

lexnames.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221
  1. <html>
  2. <title>
  3. data
  4. </title>
  5. <body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#330088" ALINK="#FF0044">
  6. <H1>Lexical File Names in Plan 9
  7. <br>
  8. or
  9. <br>
  10. Getting Dot-Dot Right
  11. </H1>
  12. <DL><DD><I>Rob Pike<br>
  13. <TT>rob@plan9.bell-labs.com</TT>
  14. Bell Laboratories, Murray Hill, NJ, 07974
  15. </I></DL>
  16. <DL><DD><H4>ABSTRACT</H4>
  17. <br>&#32;<br>
  18. Symbolic links make the Unix file system non-hierarchical, resulting in
  19. multiple valid path names for a given file.
  20. This ambiguity is a source of confusion, especially since some shells
  21. work overtime to present a consistent view from programs such as
  22. <TT>pwd</TT>,
  23. while other programs and
  24. the kernel itself do nothing about the problem.
  25. <br>&#32;<br>
  26. Plan 9 has no symbolic links but it does have other mechanisms that produce the same difficulty.
  27. Moreover, Plan 9 is founded on the ability to control a program's environment
  28. by manipulating its name space.
  29. Ambiguous names muddle the result of operations such as copying a name space across
  30. the network.
  31. <br>&#32;<br>
  32. To address these problems,
  33. the Plan 9 kernel has been modified to maintain an accurate path name for every active
  34. file (open file, working directory, mount table entry) in the system.
  35. The definition of `accurate' is that the path name for a file is guaranteed to be the rooted,
  36. absolute name
  37. the program used to acquire it.
  38. These names are maintained by an efficient method that combines lexical processing&#173;such as
  39. evaluating
  40. <TT>..</TT>
  41. by just removing the last path name element of a directory&#173;with
  42. local operations within the file system to maintain a consistently, easily understood view
  43. of the name system.
  44. Ambiguous situations are resolved by examining the lexically maintained names themselves.
  45. <br>&#32;<br>
  46. A new kernel call,
  47. <TT>fd2path</TT>,
  48. returns the file name associated with an open file,
  49. permitting the use of reliable names to improve system
  50. services ranging from
  51. <TT>pwd</TT>
  52. to debugging.
  53. Although this work was done in Plan 9,
  54. Unix systems could also benefit from the addition of
  55. a method to recover the accurate name of an
  56. open file or the current directory.
  57. </DL>
  58. <H4>Motivation
  59. </H4>
  60. <br>&#32;<br>
  61. Consider the following unedited transcript of a session running the Bourne shell on a modern
  62. Unix system:
  63. <DL><DT><DD><TT><PRE>
  64. % echo $HOME
  65. /home/rob
  66. % cd $HOME
  67. % pwd
  68. /n/bopp/v7/rob
  69. % cd /home/rob
  70. % cd /home/ken
  71. % cd ../rob
  72. ../rob: bad directory
  73. %
  74. </PRE></TT></DL>
  75. (The same output results from running
  76. <TT>tcsh</TT>;
  77. we'll discuss
  78. <TT>ksh</TT>
  79. in a moment.)
  80. To a neophyte being schooled in the delights of a hierarchical file name space,
  81. this behavior must be baffling.
  82. It is, of course, the consequence of a series of symbolic links intended to give users
  83. the illusion they share a disk, when in fact their files are scattered over several devices:
  84. <DL><DT><DD><TT><PRE>
  85. % ls -ld /home/rob /home/ken
  86. lrwxr-xr-x 1 root sys 14 Dec 26 1998 /home/ken -&#62; /n/bopp/v6/ken
  87. lrwxr-xr-x 1 root sys 14 Dec 23 1998 /home/rob -&#62; /n/bopp/v7/rob
  88. %
  89. </PRE></TT></DL>
  90. The introduction of symbolic links has changed the Unix file system from a true
  91. hierarchy into a directed graph, rendering
  92. <TT>..</TT>
  93. ambiguous and sowing confusion.
  94. <br>&#32;<br>
  95. Unix popularized hierarchical naming, but the introduction of symbolic links
  96. made its naming irregular.
  97. Worse, the
  98. <TT>pwd</TT>
  99. command, through the underlying
  100. <TT>getwd</TT>
  101. library routine,
  102. uses a tricky, expensive algorithm that often delivers the wrong answer.
  103. Starting from the current directory,
  104. <TT>getwd</TT>
  105. opens the parent,
  106. <TT>..</TT>,
  107. and searches it for an entry whose i-number matches the current directory;
  108. the matching entry is the final path element of the ultimate result.
  109. Applying this process iteratively,
  110. <TT>getwd</TT>
  111. works back towards the root.
  112. Since
  113. <TT>getwd</TT>
  114. knows nothing about symbolic links, it will recover surprising names for
  115. directories reached by them,
  116. as illustrated by the example;
  117. the backward paths
  118. <TT>getwd</TT>
  119. traverses will not backtrack across the links.
  120. <br>&#32;<br>
  121. Partly for efficiency and partly to make
  122. <TT>cd</TT>
  123. and
  124. <TT>pwd</TT>
  125. more predictable, the Korn shell
  126. <TT>ksh</TT>
  127. [Korn94]
  128. implements
  129. <TT>pwd</TT>
  130. as a builtin.
  131. (The
  132. <TT>cd</TT>
  133. command must be a builtin in any shell, since the current directory is unique to each process.)
  134. <TT>Ksh</TT>
  135. maintains its own private view of the file system to try to disguise symbolic links;
  136. in particular,
  137. <TT>cd</TT>
  138. and
  139. <TT>pwd</TT>
  140. involve some lexical processing (somewhat like the
  141. <TT>cleanname</TT>
  142. function discussed later
  143. in this paper), augmented by heuristics such as examining the environment
  144. for names like
  145. <TT>$HOME</TT>
  146. and
  147. <TT>$PWD</TT>
  148. to assist initialization of the state of the private view. [Korn00]
  149. <br>&#32;<br>
  150. This transcript begins with a Bourne shell running:
  151. <DL><DT><DD><TT><PRE>
  152. % cd /home/rob
  153. % pwd
  154. /n/bopp/v7/rob
  155. % ksh
  156. $ pwd
  157. /home/rob
  158. $
  159. </PRE></TT></DL>
  160. This result is encouraging. Another example, again starting from a Bourne shell:
  161. <DL><DT><DD><TT><PRE>
  162. % cd /home/rob
  163. % cd ../ken
  164. ../ken: bad directory
  165. % ksh
  166. $ pwd
  167. /home/rob
  168. $ cd ../ken
  169. $ pwd
  170. /home/ken
  171. $
  172. </PRE></TT></DL>
  173. By doing extra work,
  174. the Korn shell is providing more sensible behavior,
  175. but it is easy to defeat:
  176. <DL><DT><DD><TT><PRE>
  177. % cd /home/rob
  178. % pwd
  179. /n/bopp/v7/rob
  180. % cd bin
  181. % pwd
  182. /n/bopp/v7/rob/bin
  183. % ksh
  184. $ pwd
  185. /n/bopp/v7/rob/bin
  186. $ exit
  187. % cd /home/ken
  188. % pwd
  189. /n/bopp/v6/ken
  190. % ksh
  191. $ pwd
  192. /n/bopp/v6/ken
  193. $
  194. </PRE></TT></DL>
  195. In these examples,
  196. <TT>ksh</TT>'s
  197. built-in
  198. <TT>pwd</TT>
  199. failed to produce the results
  200. (<TT>/home/rob/bin</TT>
  201. and
  202. <TT>/home/ken</TT>)
  203. that the previous example might have led us to expect.
  204. The Korn shell is hiding the problem, not solving it, and in fact is not even hiding it very well.
  205. <br>&#32;<br>
  206. A deeper question is whether the shell should even be trying to make
  207. <TT>pwd</TT>
  208. and
  209. <TT>cd</TT>
  210. do a better job.
  211. If it does, then the
  212. <TT>getwd</TT>
  213. library call and every program that uses it will behave differently from the shell,
  214. a situation that is sure to confuse.
  215. Moreover, the ability to change directory to
  216. <TT>../ken</TT>
  217. with the Korn shell's
  218. <TT>cd</TT>
  219. command but not with the
  220. <TT>chdir</TT>
  221. system call is a symptom of a diseased system, not a healthy shell.
  222. <br>&#32;<br>
  223. The operating system should provide names that work and make sense.
  224. Symbolic links, though, are here to stay, so we need a way to provide
  225. sensible, unambiguous names in the face of a non-hierarchical name space.
  226. This paper shows how the challenge was met on Plan 9, an operating system
  227. with Unix-like naming.
  228. <H4>Names in Plan 9
  229. </H4>
  230. <br>&#32;<br>
  231. Except for some details involved with bootstrapping, file names in Plan 9 have the same syntax as in Unix.
  232. Plan 9 has no symbolic links, but its name space construction operators,
  233. <TT>bind</TT>
  234. and
  235. <TT>mount</TT>,
  236. make it possible to build the same sort of non-hierarchical structures created
  237. by symbolically linking directories on Unix.
  238. <br>&#32;<br>
  239. Plan 9's
  240. <TT>mount</TT>
  241. system call takes a file descriptor
  242. and attaches to the local name space the file system service it represents:
  243. <DL><DT><DD><TT><PRE>
  244. mount(fd, "/dir", flags)
  245. </PRE></TT></DL>
  246. Here
  247. <TT>fd</TT>
  248. is a file descriptor to a communications port such as a pipe or network connection;
  249. at the other end of the port is a service, such as file server, that talks 9P, the Plan 9 file
  250. system protocol.
  251. After the call succeeds, the root directory of the service will be visible at the
  252. <I>mount point</I>
  253. <TT>/dir</TT>,
  254. much as with the
  255. <TT>mount</TT>
  256. call of Unix.
  257. The
  258. <TT>flag</TT>
  259. argument specifies the nature of the attachment:
  260. <TT>MREPL</TT>
  261. says that the contents of the root directory (appear to) replace the current contents of
  262. <TT>/dir</TT>;
  263. <TT>MAFTER</TT>
  264. says that the current contents of
  265. <TT>dir</TT>
  266. remain visible, with the mounted directory's contents appearing
  267. <I>after</I>
  268. any existing files;
  269. and
  270. <TT>MBEFORE</TT>
  271. says that the contents remain visible, with
  272. the mounted directory's contents appearing
  273. <I>before</I>
  274. any existing files.
  275. These multicomponent directories are called
  276. <I>union directories</I>
  277. and are somewhat different from union directories in 4.4BSD-Lite [PeMc95], because
  278. only the top-level directory itself is unioned, not its descendents, recursively.
  279. (Plan 9's union directories are used differently from 4.4BSD-Lite's, as will become apparent.)
  280. <br>&#32;<br>
  281. For example, to bootstrap a diskless computer the system builds a local name space containing
  282. only the root directory,
  283. <TT>/</TT>,
  284. then uses the network to open a connection
  285. to the main file server.
  286. It then executes
  287. <DL><DT><DD><TT><PRE>
  288. mount(rootfd, "/", MREPL);
  289. </PRE></TT></DL>
  290. After this call, the entire file server's tree is visible, starting from the root of the local machine.
  291. <br>&#32;<br>
  292. While
  293. <TT>mount</TT>
  294. connects a new service to the local name space,
  295. <TT>bind</TT>
  296. rearranges the existing name space:
  297. <DL><DT><DD><TT><PRE>
  298. bind("tofile", "fromfile", flags)
  299. </PRE></TT></DL>
  300. causes subsequent mention of the
  301. <TT>fromfile</TT>
  302. (which may be a plain file or a directory)
  303. to behave as though
  304. <TT>tofile</TT>
  305. had been mentioned instead, somewhat like a symbolic link.
  306. (Note, however, that the arguments are in the opposite order
  307. compared to
  308. <TT>ln</TT>
  309. <TT>-s</TT>).
  310. The
  311. <TT>flags</TT>
  312. argument is the same as with
  313. <TT>mount</TT>.
  314. <br>&#32;<br>
  315. As an example, a sequence something like the following is done at bootstrap time to
  316. assemble, under the single directory
  317. <TT>/bin</TT>,
  318. all of the binaries suitable for this architecture, represented by (say) the string
  319. <TT>sparc</TT>:
  320. <DL><DT><DD><TT><PRE>
  321. bind("/sparc/bin", "/bin", MREPL);
  322. bind("/usr/rob/sparc/bin", "/bin", MAFTER);
  323. </PRE></TT></DL>
  324. This sequence of
  325. <TT>binds</TT>
  326. causes
  327. <TT>/bin</TT>
  328. to contain first the standard binaries, then the contents of
  329. <TT>rob</TT>'s
  330. private SPARC binaries.
  331. The ability to build such union directories
  332. obviates the need for a shell
  333. <TT>$PATH</TT>
  334. variable
  335. while providing opportunities for managing heterogeneity.
  336. If the system were a Power PC, the same sequence would be run with
  337. <TT>power</TT>
  338. textually substituted for
  339. <TT>sparc</TT>
  340. to place the Power PC binaries in
  341. <TT>/bin</TT>
  342. rather than the SPARC binaries.
  343. <br>&#32;<br>
  344. Trouble is already brewing. After these bindings are set up,
  345. where does
  346. <DL><DT><DD><TT><PRE>
  347. % cd /bin
  348. % cd ..
  349. </PRE></TT></DL>
  350. set the current working directory, to
  351. <TT>/</TT>
  352. or
  353. <TT>/sparc</TT>
  354. or
  355. <TT>/usr/rob/sparc</TT>?
  356. We will return to this issue.
  357. <br>&#32;<br>
  358. There are some important differences between
  359. <TT>binds</TT>
  360. and symbolic links.
  361. First,
  362. symbolic links are a static part of the file system, while
  363. Plan 9 bindings are created at run time, are stored in the kernel,
  364. and endure only as long as the system maintains them;
  365. they are temporary.
  366. Since they are known to the kernel but not the file system, they must
  367. be set up each time the kernel boots or a user logs in;
  368. permanent bindings are created by editing system initialization scripts
  369. and user profiles rather than by building them in the file system itself.
  370. <br>&#32;<br>
  371. The Plan 9 kernel records what bindings are active for a process,
  372. whereas symbolic links, being held on the Unix file server, may strike whenever the process evaluates
  373. a file name.
  374. Also, symbolic links apply to all processes that evaluate the affected file, whereas
  375. <TT>bind</TT>
  376. has a local scope, applying only to the process that executes it and possibly some of its
  377. peers, as discussed in the next section.
  378. Symbolic links cannot construct the sort of
  379. <TT>/bin</TT>
  380. directory built here; it is possible to have multiple directories point to
  381. <TT>/bin</TT>
  382. but not the other way around.
  383. <br>&#32;<br>
  384. Finally,
  385. symbolic links are symbolic, like macros: they evaluate the associated names each time
  386. they are accessed.
  387. Bindings, on the other hand, are evaluated only once, when the bind is executed;
  388. after the binding is set up, the kernel associates the underlying files, rather than their names.
  389. In fact, the kernel's representation of a bind is identical to its representation of a mount;
  390. in effect, a bind is a mount of the
  391. <TT>tofile</TT>
  392. upon the
  393. <TT>fromfile</TT>.
  394. The binds and mounts coexist in a single
  395. <I>mount table</I>,
  396. the subject of the next section.
  397. <H4>The Mount Table
  398. </H4>
  399. <br>&#32;<br>
  400. Unix has a single global mount table
  401. for all processes in the system, but Plan 9's mount tables are local to each process.
  402. By default it is inherited when a process forks, so mounts and binds made by one
  403. process affect the other, but a process may instead inherit a copy,
  404. so modifications it makes will be invisible to other processes.
  405. The convention is that related processes, such
  406. as processes running in a single window, share a mount table, while sets of processes
  407. in different windows have distinct mount tables.
  408. In practice, the name spaces of the two windows will appear largely the same,
  409. but the possibility for different processes to see different files (hence services) under
  410. the same name is fundamental to the system,
  411. affecting the design of key programs such as the
  412. window system [Pike91].
  413. <br>&#32;<br>
  414. The Plan 9 mount table is little more than an ordered list of pairs, mapping the
  415. <TT>fromfiles</TT>
  416. to the
  417. <TT>tofiles</TT>.
  418. For mounts, the
  419. <TT>tofile</TT>
  420. will be an item called a
  421. <TT>Channel</TT>,
  422. similar to a Unix
  423. <TT>vnode</TT>,
  424. pointing to the root of the file service,
  425. while for a bind it will be the
  426. <TT>Channel</TT>
  427. pointing to the
  428. <TT>tofile</TT>
  429. mentioned in the
  430. <TT>bind</TT>
  431. call.
  432. In both cases, the
  433. <TT>fromfile</TT>
  434. entry in the table
  435. will be a
  436. <TT>Channel</TT>
  437. pointing to the
  438. <TT>fromfile</TT>
  439. itself.
  440. <br>&#32;<br>
  441. The evaluation of a file name proceeds as follows.
  442. If the name begins with a slash, start with the
  443. <TT>Channel</TT>
  444. for the root; otherwise start with the
  445. <TT>Channel</TT>
  446. for the current directory of the process.
  447. For each path element in the name,
  448. such as
  449. <TT>usr</TT>
  450. in
  451. <TT>/usr/rob</TT>,
  452. try to `walk' the
  453. <TT>Channel</TT>
  454. to that element [Pike93].
  455. If the walk succeeds, look to see if the resulting
  456. <TT>Channel</TT>
  457. is the same as any
  458. <TT>fromfile</TT>
  459. in the mount table, and if so, replace it by the corresponding
  460. <TT>tofile</TT>.
  461. Advance to the next element and continue.
  462. <br>&#32;<br>
  463. There are a couple of nuances. If the directory being walked is a union directory,
  464. the walk is attempted in the elements of the union, in order, until a walk succeeds.
  465. If none succeed, the operation fails.
  466. Also, when the destination of a walk is a directory for a purpose such as the
  467. <TT>chdir</TT>
  468. system call or the
  469. <TT>fromfile</TT>
  470. in a
  471. <TT>bind</TT>,
  472. once the final walk of the sequence has completed the operation stops;
  473. the final check through the mount table is not done.
  474. Among other things, this simplifies the management of union directories;
  475. for example, subsequent
  476. <TT>bind</TT>
  477. calls will append to the union associated with the underlying
  478. <TT>fromfile</TT>
  479. instead of what is bound upon it.
  480. <H4>A Definition of Dot-Dot
  481. </H4>
  482. <br>&#32;<br>
  483. The ability to construct union directories and other intricate naming structures
  484. introduces some thorny problems: as with symbolic links,
  485. the name space is no longer hierarchical, files and directories can have multiple
  486. names, and the meaning of
  487. <TT>..</TT>,
  488. the parent directory, can be ambiguous.
  489. <br>&#32;<br>
  490. The meaning of
  491. <TT>..</TT>
  492. is straightforward if the directory is in a locally hierarchical part of the name space,
  493. but if we ask what
  494. <TT>..</TT>
  495. should identify when the current directory is a mount point or union directory or
  496. multiply symlinked spot (which we will henceforth call just a mount point, for brevity),
  497. there is no obvious answer.
  498. Name spaces have been part of Plan 9 from the beginning, but the definition of
  499. <TT>..</TT>
  500. has changed several times as we grappled with this issue.
  501. In fact, several attempts to clarify the meaning of
  502. <TT>..</TT>
  503. by clever coding
  504. resulted in definitions that could charitably be summarized as `what the implementation gives.'
  505. <br>&#32;<br>
  506. Frustrated by this situation, and eager to have better-defined names for some of the
  507. applications described later in this paper, we recently proposed the following definition
  508. for
  509. <TT>..</TT>:
  510. <DL>
  511. <DT><DT>&#32;<DD>
  512. The parent of a directory
  513. <I>X</I>,
  514. <I>X<TT>/..</TT>,</I>
  515. is the same directory that would obtain if
  516. we instead accessed the directory named by stripping away the last
  517. path name element of
  518. <I>X</I>.
  519. </dl>
  520. <br>&#32;<br>
  521. For example, if we are in the directory
  522. <TT>/a/b/c</TT>
  523. and
  524. <TT>chdir</TT>
  525. to
  526. <TT>..</TT>,
  527. the result is
  528. <I>exactly</I>
  529. as if we had executed a
  530. <TT>chdir</TT>
  531. to
  532. <TT>/a/b</TT>.
  533. <br>&#32;<br>
  534. This definition is easy to understand and seems natural.
  535. It is, however, a purely
  536. <I>lexical</I>
  537. definition that flatly ignores evaluated file names, mount tables, and
  538. other kernel-resident data structures.
  539. Our challenge is to implement it efficiently.
  540. One obvious (and correct)
  541. implementation is to rewrite path names lexically to fold out
  542. <TT>..</TT>,
  543. and then evaluate the file name forward from the root,
  544. but this is expensive and unappealing.
  545. We want to be able to use local operations to evaluate file names,
  546. but maintain the global, lexical definition of dot-dot.
  547. It isn't too hard.
  548. <H4>The Implementation
  549. </H4>
  550. <br>&#32;<br>
  551. To operate lexically on file names, we associate a name with each open file in the kernel, that
  552. is, with each
  553. <TT>Channel</TT>
  554. data structure.
  555. The first step is therefore to store a
  556. <TT>char*</TT>
  557. with each
  558. <TT>Channel</TT>
  559. in the system, called its
  560. <TT>Cname</TT>,
  561. that records the
  562. <I>absolute</I>
  563. rooted
  564. file name for the
  565. <TT>Channel</TT>.
  566. <TT>Cnames</TT>
  567. are stored as full text strings, shared copy-on-write for efficiency.
  568. The task is to maintain each
  569. <TT>Cname</TT>
  570. as an accurate absolute name using only local operations.
  571. <br>&#32;<br>
  572. When a file is opened, the file name argument in the
  573. <TT>open</TT>
  574. (or
  575. <TT>chdir</TT>
  576. or
  577. <TT>bind</TT>
  578. or ...) call is recorded in the
  579. <TT>Cname</TT>
  580. of the resulting
  581. <TT>Channel</TT>.
  582. When the file name begins with a slash, the name is stored as is,
  583. subject to a cleanup pass described in the next section.
  584. Otherwise, it is a local name, and the file name must be made
  585. absolute by prefixing it with the
  586. <TT>Cname</TT>
  587. of the current directory, followed by a slash.
  588. For example, if we are in
  589. <TT>/home/rob</TT>
  590. and
  591. <TT>chdir</TT>
  592. to
  593. <TT>bin</TT>,
  594. the
  595. <TT>Cname</TT>
  596. of the resulting
  597. <TT>Channel</TT>
  598. will be the string
  599. <TT>/home/rob/bin</TT>.
  600. <br>&#32;<br>
  601. This assumes, of course, that the local file name contains no
  602. <TT>..</TT>
  603. elements.
  604. If it does, instead of storing for example
  605. <TT>/home/rob/..</TT>
  606. we delete the last element of the existing name and set the
  607. <TT>Cname</TT>
  608. to
  609. <TT>/home</TT>.
  610. To maintain the lexical naming property we must guarantee that the resulting
  611. <TT>Cname</TT>,
  612. if it were to be evaluated, would yield the identical directory to the one
  613. we actually do get by the local
  614. <TT>..</TT>
  615. operation.
  616. <br>&#32;<br>
  617. If the current directory is not a mount point, it is easy to maintain the lexical property.
  618. If it is a mount point, though, it is still possible to maintain it on Plan 9
  619. because the mount table, a kernel-resident data structure, contains all the
  620. information about the non-hierarchical connectivity of the name space.
  621. (On Unix, by contrast, symbolic links are stored on the file server rather than in the kernel.)
  622. Moreover, the presence of a full file name for each
  623. <TT>Channel</TT>
  624. in the mount table provides the information necessary to resolve ambiguities.
  625. <br>&#32;<br>
  626. The mount table is examined in the
  627. <TT>from->to</TT>
  628. direction when evaluating a name, but
  629. <TT>..</TT>
  630. points backwards in the hierarchy, so to evaluate
  631. <TT>..</TT>
  632. the table must be examined in the
  633. <TT>to->from</TT>
  634. direction.
  635. (``How did we get here?'')
  636. <br>&#32;<br>
  637. The value of
  638. <TT>..</TT>
  639. is ambiguous when there are multiple bindings (mount points) that point to
  640. the directories involved in the evaluation of
  641. <TT>..</TT>.
  642. For example, return to our original script with
  643. <TT>/n/bopp/v6</TT>
  644. (containing a home directory for
  645. <TT>ken</TT>)
  646. and
  647. <TT>/n/bopp/v7</TT>
  648. (containing a home directory for
  649. <TT>rob</TT>)
  650. unioned into
  651. <TT>/home</TT>.
  652. This is represented by two entries in the mount table,
  653. <TT>from=/home</TT>,
  654. <TT>to=/n/bopp/v6</TT>
  655. and
  656. <TT>from=/home</TT>,
  657. <TT>to=/n/bopp/v7</TT>.
  658. If we have set our current directory to
  659. <TT>/home/rob</TT>
  660. (which has landed us in the physical location
  661. <TT>/n/bopp/v7/rob</TT>)
  662. our current directory is not a mount point but its parent is.
  663. The value of
  664. <TT>..</TT>
  665. is ambiguous: it could be
  666. <TT>/home</TT>,
  667. <TT>/n/bopp/v7</TT>,
  668. or maybe even
  669. <TT>/n/bopp/v6</TT>,
  670. and the ambiguity is caused by two
  671. <TT>tofiles</TT>
  672. bound to the same
  673. <TT>fromfile</TT>.
  674. By our definition, if we now evaluate
  675. <TT>..</TT>,
  676. we should acquire the directory
  677. <TT>/home</TT>;
  678. otherwise
  679. <TT>../ken</TT>
  680. could not possibly result in
  681. <TT>ken</TT>'s
  682. home directory, which it should.
  683. On the other hand, if we had originally gone to
  684. <TT>/n/bopp/v7/rob</TT>,
  685. the name
  686. <TT>../ken</TT>
  687. should
  688. <I>not</I>
  689. evaluate to
  690. <TT>ken</TT>'s
  691. home directory because there is no directory
  692. <TT>/n/bopp/v7/ken</TT>
  693. (<TT>ken</TT>'s
  694. home directory is on
  695. <TT>v6</TT>).
  696. The problem is that by using local file operations, it is impossible
  697. to distinguish these cases: regardless of whether we got here using the name
  698. <TT>/home/rob</TT>
  699. or
  700. <TT>/n/bopp/v7/rob</TT>,
  701. the resulting directory is the same.
  702. Moreover, the mount table does not itself have enough information
  703. to disambiguate: when we do a local operation to evaluate
  704. <TT>..</TT>
  705. and land in
  706. <TT>/n/bopp/v7</TT>,
  707. we discover that the directory is a
  708. <TT>tofile</TT>
  709. in the mount table; should we step back through the table to
  710. <TT>/home</TT>
  711. or not?
  712. <br>&#32;<br>
  713. The solution comes from the
  714. <TT>Cnames</TT>
  715. themselves.
  716. Whether to step back through the mount point
  717. <TT>from=/home</TT>,
  718. <TT>to=/n/bopp/v7</TT>
  719. when evaluating
  720. <TT>..</TT>
  721. in
  722. <TT>rob</TT>'s
  723. directory is trivially resolved by asking the question,
  724. Does the
  725. <TT>Cname</TT>
  726. for the directory begin
  727. <TT>/home</TT>?
  728. If it does, then the path that was evaluated to get us to the current
  729. directory must have gone through this mount point, and we should
  730. back up through it to evaluate
  731. <TT>..</TT>;
  732. if not, then this mount table entry is irrelevant.
  733. <br>&#32;<br>
  734. More precisely,
  735. both
  736. <I>before</I>
  737. and
  738. <I>after</I>
  739. each
  740. <TT>..</TT>
  741. element in the path name is evaluated,
  742. if the directory is a
  743. <TT>tofile</TT>
  744. in the mount table, the corresponding
  745. <TT>fromfile</TT>
  746. is taken instead, provided the
  747. <TT>Cname</TT>
  748. of the corresponding
  749. <TT>fromfile</TT>
  750. is the prefix of the
  751. <TT>Cname</TT>
  752. of the original directory.
  753. Since we always know the full name of the directory
  754. we are evaluating, we can always compare it against all the entries in the mount table that point
  755. to it, thereby resolving ambiguous situations
  756. and maintaining the
  757. lexical property of
  758. <TT>..</TT>.
  759. This check also guarantees we don't follow a misleading mount point, such as the entry pointing to
  760. <TT>/home</TT>
  761. when we are really in
  762. <TT>/n/bopp/v7/rob</TT>.
  763. Keeping the full names with the
  764. <TT>Channels</TT>
  765. makes it easy to use the mount table to decide how we got here and, therefore,
  766. how to get back.
  767. <br>&#32;<br>
  768. In summary, the algorithm is as follows.
  769. Use the usual file system operations to walk to
  770. <TT>..</TT>;
  771. call the resulting directory
  772. <I>d</I>.
  773. Lexically remove
  774. the last element of the initial file name.
  775. Examine all entries in the mount table whose
  776. <TT>tofile</TT>
  777. is
  778. <I>d</I>
  779. and whose
  780. <TT>fromfile</TT>
  781. has a
  782. <TT>Cname</TT>
  783. identical to the truncated name.
  784. If one exists, that
  785. <TT>fromfile</TT>
  786. is the correct result; by construction, it also has the right
  787. <TT>Cname</TT>.
  788. In our example, evaluating
  789. <TT>..</TT>
  790. in
  791. <TT>/home/rob</TT>
  792. (really
  793. <TT>/n/bopp/v7/rob</TT>)
  794. will set
  795. <I>d</I>
  796. to
  797. <TT>/n/bopp/v7</TT>;
  798. that is a
  799. <TT>tofile</TT>
  800. whose
  801. <TT>fromfile</TT>
  802. is
  803. <TT>/home</TT>.
  804. Removing the
  805. <TT>/rob</TT>
  806. from the original
  807. <TT>Cname</TT>,
  808. we find the name
  809. <TT>/home</TT>,
  810. which matches that of the
  811. <TT>fromfile</TT>,
  812. so the result is the
  813. <TT>fromfile</TT>,
  814. <TT>/home</TT>.
  815. <br>&#32;<br>
  816. Since this implementation uses only local operations to maintain its names,
  817. it is possible to confuse it by external changes to the file system.
  818. Deleting or renaming directories and files that are part of a
  819. <TT>Cname</TT>,
  820. or modifying the mount table, can introduce errors.
  821. With more implementation work, such mistakes could probably be caught,
  822. but in a networked environment, with machines sharing a remote file server, renamings
  823. and deletions made by one machine may go unnoticed by others.
  824. These problems, however, are minor, uncommon and, most important, easy to understand.
  825. The method maintains the lexical property of file names unless an external
  826. agent changes the name surreptitiously;
  827. within a stable file system, it is always maintained and
  828. <TT>pwd</TT>
  829. is always right.
  830. <br>&#32;<br>
  831. To recapitulate, maintaining the
  832. <TT>Channel</TT>'s
  833. absolute file names lexically and using the names to disambiguate the
  834. mount table entries when evaluating
  835. <TT>..</TT>
  836. at a mount point
  837. combine to maintain the lexical definition of
  838. <TT>..</TT>
  839. efficiently.
  840. <H4>Cleaning names
  841. </H4>
  842. <br>&#32;<br>
  843. The lexical processing can generate names that are messy or redundant,
  844. ones with extra slashes or embedded
  845. <TT>../</TT>
  846. or
  847. <TT>./</TT>
  848. elements and other extraneous artifacts.
  849. As part of the kernel's implementation, we wrote a procedure,
  850. <TT>cleanname</TT>,
  851. that rewrites a name in place to canonicalize its appearance.
  852. The procedure is useful enough that it is now part of the Plan 9 C
  853. library and is employed by many programs to make sure they always
  854. present clean file names.
  855. <br>&#32;<br>
  856. <TT>Cleanname</TT>
  857. is analogous to the URL-cleaning rules defined in RFC 1808 [Field95], although
  858. the rules are slightly different.
  859. <TT>Cleanname</TT>
  860. iteratively does the following until no further processing can be done:
  861. <DL>
  862. <DT><DT>&#32;<DD>
  863. 1. Reduce multiple slashes to a single slash.
  864. <DT><DT>&#32;<DD>
  865. 2. Eliminate
  866. <TT>.</TT>
  867. path name elements
  868. (the current directory).
  869. <DT><DT>&#32;<DD>
  870. 3. Eliminate
  871. <TT>..</TT>
  872. path name elements (the parent directory) and the
  873. non-<TT>.</TT>
  874. non-<TT>..,</TT>
  875. element that precedes them.
  876. <DT><DT>&#32;<DD>
  877. 4. Eliminate
  878. <TT>..</TT>
  879. elements that begin a rooted path, that is, replace
  880. <TT>/..</TT>
  881. by
  882. <TT>/</TT>
  883. at the beginning of a path.
  884. <DT><DT>&#32;<DD>
  885. 5. Leave intact
  886. <TT>..</TT>
  887. elements that begin a non-rooted path.
  888. </dl>
  889. <br>&#32;<br>
  890. If the result of this process is a null string,
  891. <TT>cleanname</TT>
  892. returns the string
  893. <TT>"."</TT>,
  894. representing the current directory.
  895. <H4>The fd2path system call
  896. </H4>
  897. <br>&#32;<br>
  898. Plan 9 has a new system call,
  899. <TT>fd2path</TT>,
  900. to enable programs to extract the
  901. <TT>Cname</TT>
  902. associated with an open file descriptor.
  903. It takes three arguments: a file descriptor, a buffer, and the size of the buffer:
  904. <DL><DT><DD><TT><PRE>
  905. int fd2path(int fd, char *buf, int nbuf)
  906. </PRE></TT></DL>
  907. It returns an error if the file descriptor is invalid; otherwise it fills the buffer with the name
  908. associated with
  909. <TT>fd</TT>.
  910. (If the name is too long, it is truncated; perhaps this condition should also draw an error.)
  911. The
  912. <TT>fd2path</TT>
  913. system call is very cheap, since all it does is copy the
  914. <TT>Cname</TT>
  915. string to user space.
  916. <br>&#32;<br>
  917. The Plan 9 implementation of
  918. <TT>getwd</TT>
  919. uses
  920. <TT>fd2path</TT>
  921. rather than the tricky algorithm necessary in Unix:
  922. <DL><DT><DD><TT><PRE>
  923. char*
  924. getwd(char *buf, int nbuf)
  925. {
  926. int n, fd;
  927. fd = open(".", OREAD);
  928. if(fd &#60; 0)
  929. return NULL;
  930. n = fd2path(fd, buf, nbuf);
  931. close(fd);
  932. if(n &#60; 0)
  933. return NULL;
  934. return buf;
  935. }
  936. </PRE></TT></DL>
  937. (The Unix specification of
  938. <TT>getwd</TT>
  939. does not include a count argument.)
  940. This version of
  941. <TT>getwd</TT>
  942. is not only straightforward, it is very efficient, reducing the performance
  943. advantage of a built-in
  944. <TT>pwd</TT>
  945. command while guaranteeing that all commands, not just
  946. <TT>pwd</TT>,
  947. see sensible directory names.
  948. <br>&#32;<br>
  949. Here is a routine that prints the file name associated
  950. with each of its open file descriptors; it is useful for tracking down file descriptors
  951. left open by network listeners, text editors that spawn commands, and the like:
  952. <DL><DT><DD><TT><PRE>
  953. void
  954. openfiles(void)
  955. {
  956. int i;
  957. char buf[256];
  958. for(i=0; i&#60;NFD; i++)
  959. if(fd2path(i, buf, sizeof buf) &#62;= 0)
  960. print("%d: %s\n", i, buf);
  961. }
  962. </PRE></TT></DL>
  963. <H4>Uses of good names
  964. </H4>
  965. <br>&#32;<br>
  966. Although
  967. <TT>pwd</TT>
  968. was the motivation for getting names right, good file names are useful in many contexts
  969. and have become a key part of the Plan 9 programming environment.
  970. The compilers record in the symbol table the full name of the source file, which makes
  971. it easy to track down the source of buggy, old software and also permits the
  972. implementation of a program,
  973. <TT>src</TT>,
  974. to automate tracking it down.
  975. Given the name of a program,
  976. <TT>src</TT>
  977. reads its symbol table, extracts the file information,
  978. and triggers the editor to open a window on the program's
  979. source for its
  980. <TT>main</TT>
  981. routine.
  982. No guesswork, no heuristics.
  983. <br>&#32;<br>
  984. The
  985. <TT>openfiles</TT>
  986. routine was the inspiration for a new file in the
  987. <TT>/proc</TT>
  988. file system [Kill84].
  989. For process
  990. <I>n</I>,
  991. the file
  992. <TT>/proc/<I>n</I>/fd</TT>
  993. is a list of all its open files, including its working directory,
  994. with associated information including its open status,
  995. I/O offset, unique id (analogous to i-number)
  996. and file name.
  997. Here is the contents of the
  998. <TT>fd</TT>
  999. file for a process in the window system on the machine being used to write this paper:
  1000. <DL><DT><DD><TT><PRE>
  1001. % cat /proc/125099/fd
  1002. /usr/rob
  1003. 0 r M 5141 00000001.00000000 0 /mnt/term/dev/cons
  1004. 1 w M 5141 00000001.00000000 51 /mnt/term/dev/cons
  1005. 2 w M 5141 00000001.00000000 51 /mnt/term/dev/cons
  1006. 3 r M 5141 0000000b.00000000 1166 /dev/snarf
  1007. 4 rw M 5141 0ffffffc.00000000 288 /dev/draw/new
  1008. 5 rw M 5141 00000036.00000000 4266337 /dev/draw/3/data
  1009. 6 r M 5141 00000037.00000000 0 /dev/draw/3/refresh
  1010. 7 r c 0 00000004.00000000 6199848 /dev/bintime
  1011. %
  1012. </PRE></TT></DL>
  1013. (The Linux implementation of
  1014. <TT>/proc</TT>
  1015. provides a related service by giving a directory in which each file-descriptor-numbered file is
  1016. a symbolic link to the file itself.)
  1017. When debugging errant systems software, such information can be valuable.
  1018. <br>&#32;<br>
  1019. Another motivation for getting names right was the need to extract from the system
  1020. an accurate description of the mount table, so that a process's name space could be
  1021. recreated on another machine, in order to move (or simulate) a computing environment
  1022. across the network.
  1023. One program that does this is Plan 9's
  1024. <TT>cpu</TT>
  1025. command, which recreates the local name space on a remote machine, typically a large
  1026. fast multiprocessor.
  1027. Without accurate names, it was impossible to do the job right; now
  1028. <TT>/proc</TT>
  1029. provides a description of the name space of each process,
  1030. <TT>/proc/<I>n</I>/ns</TT>:
  1031. <DL><DT><DD><TT><PRE>
  1032. % cat /proc/125099/ns
  1033. bind / /
  1034. mount -aC #s/boot /
  1035. bind #c /dev
  1036. bind #d /fd
  1037. bind -c #e /env
  1038. bind #p /proc
  1039. bind -c #s /srv
  1040. bind /386/bin /bin
  1041. bind -a /rc/bin /bin
  1042. bind /net /net
  1043. bind -a #l /net
  1044. mount -a #s/cs /net
  1045. mount -a #s/dns /net
  1046. bind -a #D /net
  1047. mount -c #s/boot /n/emelie
  1048. bind -c /n/emelie/mail /mail
  1049. mount -c /net/il/134/data /mnt/term
  1050. bind -a /usr/rob/bin/rc /bin
  1051. bind -a /usr/rob/bin/386 /bin
  1052. mount #s/boot /n/emelieother other
  1053. bind -c /n/emelieother/rob /tmp
  1054. mount #s/boot /n/dump dump
  1055. bind /mnt/term/dev/cons /dev/cons
  1056. ...
  1057. cd /usr/rob
  1058. %
  1059. </PRE></TT></DL>
  1060. (The
  1061. <TT>#</TT>
  1062. notation identifies raw device drivers so they may be attached to the name space.)
  1063. The last line of the file gives the working directory of the process.
  1064. The format of this file is that used by a library routine,
  1065. <TT>newns</TT>,
  1066. which reads a textual description like this and reconstructs a name space.
  1067. Except for the need to quote
  1068. <TT>#</TT>
  1069. characters, the output is also a shell script that invokes the user-level commands
  1070. <TT>bind</TT>
  1071. and
  1072. <TT>mount</TT>,
  1073. which are just interfaces to the underlying system calls.
  1074. However,
  1075. files like
  1076. <TT>/net/il/134/data</TT>
  1077. represent network connections; to find out where they point, so that the corresponding
  1078. calls can be reestablished for another process,
  1079. they must be examined in more detail using the network device files [PrWi93]. Another program,
  1080. <TT>ns</TT>,
  1081. does this; it reads the
  1082. <TT>/proc/<I>n</I>/ns</TT>
  1083. file, decodes the information, and interprets it, translating the network
  1084. addresses and quoting the names when required:
  1085. <DL><DT><DD><TT><PRE>
  1086. ...
  1087. mount -a '#s/dns' /net
  1088. ...
  1089. mount -c il!135.104.3.100!12884 /mnt/term
  1090. ...
  1091. </PRE></TT></DL>
  1092. These tools make it possible to capture an accurate description of a process's
  1093. name space and recreate it elsewhere.
  1094. And like the open file descriptor table,
  1095. they are a boon to debugging; it is always helpful to know
  1096. exactly what resources a program is using.
  1097. <H4>Adapting to Unix
  1098. </H4>
  1099. <br>&#32;<br>
  1100. This work was done for the Plan 9 operating system, which has the advantage that
  1101. the non-hierarchical aspects of the name space are all known to the kernel.
  1102. It should be possible, though, to adapt it to a Unix system.
  1103. The problem is that Unix has nothing corresponding precisely to a
  1104. <TT>Channel</TT>,
  1105. which in Plan 9 represents the unique result of evaluating a name.
  1106. The
  1107. <TT>vnode</TT>
  1108. structure is a shared structure that may represent a file
  1109. known by several names, while the
  1110. <TT>file</TT>
  1111. structure refers only to open files, but for example the current working
  1112. directory of a process is not open.
  1113. Possibilities to address this discrepancy include
  1114. introducing a
  1115. <TT>Channel</TT>-like
  1116. structure that connects a name and a
  1117. <TT>vnode</TT>,
  1118. or maintaining a separate per-process table that maps names to
  1119. <TT>vnodes</TT>,
  1120. disambiguating using the techniques described here.
  1121. If it could be done
  1122. the result would be an implementation of
  1123. <TT>..</TT>
  1124. that reduces the need for a built-in
  1125. <TT>pwd</TT>
  1126. in the shell and offers a consistent, sensible interpretation of the `parent directory'.
  1127. <br>&#32;<br>
  1128. We have not done this adaptation, but we recommend that the Unix community try it.
  1129. <H4>Conclusions
  1130. </H4>
  1131. <br>&#32;<br>
  1132. It should be easy to discover a well-defined, absolute path name for every open file and
  1133. directory in the system, even in the face of symbolic links and other non-hierarchical
  1134. elements of the file name space.
  1135. In earlier versions of Plan 9, and all current versions of Unix,
  1136. names can instead be inconsistent and confusing.
  1137. <br>&#32;<br>
  1138. The Plan 9 operating system now maintains an accurate name for each file,
  1139. using inexpensive lexical operations coupled with local file system actions.
  1140. Ambiguities are resolved by examining the names themselves;
  1141. since they reflect the path that was used to reach the file, they also reflect the path back,
  1142. permitting a dependable answer to be recovered even when stepping backwards through
  1143. a multiply-named directory.
  1144. <br>&#32;<br>
  1145. Names make sense again: they are sensible and consistent.
  1146. Now that dependable names are available, system services can depend on them,
  1147. and recent work in Plan 9 is doing just that.
  1148. We&#173;the community of Unix and Unix-like systems&#173;should have done this work a long time ago.
  1149. <H4>Acknowledgements
  1150. </H4>
  1151. <br>&#32;<br>
  1152. Phil Winterbottom devised the
  1153. <TT>ns</TT>
  1154. command and the
  1155. <TT>fd</TT>
  1156. and
  1157. <TT>ns</TT>
  1158. files in
  1159. <TT>/proc</TT>,
  1160. based on an earlier implementation of path name management that
  1161. the work in this paper replaces.
  1162. Russ Cox wrote the final version of
  1163. <TT>cleanname</TT>
  1164. and helped debug the code for reversing the mount table.
  1165. Ken Thompson, Dave Presotto, and Jim McKie offered encouragement and consultation.
  1166. <H4>References
  1167. </H4>
  1168. <br>&#32;<br>
  1169. [Field95]
  1170. R. Fielding,
  1171. ``Relative Uniform Resource Locators'',
  1172. <I>Network Working Group Request for Comments: 1808</I>,
  1173. June, 1995.
  1174. <br>&#32;<br>
  1175. [Kill84]
  1176. T. J. Killian,
  1177. ``Processes as Files'',
  1178. <I>Proceedings of the Summer 1984 USENIX Conference</I>,
  1179. Salt Lake City, 1984, pp. 203-207.
  1180. <br>&#32;<br>
  1181. [Korn94]
  1182. David G. Korn,
  1183. ``ksh: An Extensible High Level Language'',
  1184. <I>Proceedings of the USENIX Very High Level Languages Symposium</I>,
  1185. Santa Fe, 1994, pp. 129-146.
  1186. <br>&#32;<br>
  1187. [Korn00]
  1188. David G. Korn,
  1189. personal communication.
  1190. <br>&#32;<br>
  1191. [PeMc95]
  1192. Jan-Simon Pendry and Marshall Kirk McKusick,
  1193. ``Union Mounts in 4.4BSD-Lite'',
  1194. <I>Proceedings of the 1995 USENIX Conference</I>,
  1195. New Orleans, 1995.
  1196. <br>&#32;<br>
  1197. [Pike91]
  1198. Rob Pike,
  1199. ``8&#189;, the Plan 9 Window System'',
  1200. <I>Proceedings of the Summer 1991 USENIX Conference</I>,
  1201. Nashville, 1991, pp. 257-265.
  1202. <br>&#32;<br>
  1203. [Pike93]
  1204. Rob Pike, Dave Presotto, Ken Thompson, Howard Trickey, and Phil Winterbottom,
  1205. ``The Use of Name Spaces in Plan 9'',
  1206. <I>Operating Systems Review</I>,
  1207. <B>27</B>,
  1208. 2, April 1993, pp. 72-76.
  1209. <br>&#32;<br>
  1210. [PrWi93]
  1211. Dave Presotto and Phil Winterbottom,
  1212. ``The Organization of Networks in Plan 9'',
  1213. <I>Proceedings of the Winter 1993 USENIX Conference</I>,
  1214. San Diego, 1993, pp. 43-50.
  1215. <br>&#32;<br>
  1216. <A href=http://www.lucent.com/copyright.html>
  1217. Copyright</A> &#169; 2000 Lucent Technologies Inc. All rights reserved.
  1218. </body></html>