%!PS %%Version: 3.3.2 %%DocumentFonts: (atend) %%Pages: (atend) %%EndComments % % Version 3.3.2 prologue for troff files. % /#copies 1 store /aspectratio 1 def /formsperpage 1 def /landscape false def /linewidth .3 def /magnification 1 def /margin 0 def /orientation 0 def /resolution 720 def /rotation 1 def /xoffset 0 def /yoffset 0 def /roundpage true def /useclippath true def /pagebbox [0 0 612 792] def /R /Times-Roman def /I /Times-Italic def /B /Times-Bold def /BI /Times-BoldItalic def /H /Helvetica def /HI /Helvetica-Oblique def /HB /Helvetica-Bold def /HX /Helvetica-BoldOblique def /CW /Courier def /CO /Courier def /CI /Courier-Oblique def /CB /Courier-Bold def /CX /Courier-BoldOblique def /PA /Palatino-Roman def /PI /Palatino-Italic def /PB /Palatino-Bold def /PX /Palatino-BoldItalic def /Hr /Helvetica-Narrow def /Hi /Helvetica-Narrow-Oblique def /Hb /Helvetica-Narrow-Bold def /Hx /Helvetica-Narrow-BoldOblique def /KR /Bookman-Light def /KI /Bookman-LightItalic def /KB /Bookman-Demi def /KX /Bookman-DemiItalic def /AR /AvantGarde-Book def /AI /AvantGarde-BookOblique def /AB /AvantGarde-Demi def /AX /AvantGarde-DemiOblique def /NR /NewCenturySchlbk-Roman def /NI /NewCenturySchlbk-Italic def /NB /NewCenturySchlbk-Bold def /NX /NewCenturySchlbk-BoldItalic def /ZD /ZapfDingbats def /ZI /ZapfChancery-MediumItalic def /S /S def /S1 /S1 def /GR /Symbol def /inch {72 mul} bind def /min {2 copy gt {exch} if pop} bind def /show {show} bind def % so later references don't bind /widthshow {widthshow} bind def /stringwidth {stringwidth} bind def /setup { counttomark 2 idiv {def} repeat pop landscape {/orientation 90 orientation add def} if /scaling 72 resolution div def linewidth setlinewidth 1 setlinecap pagedimensions xcenter ycenter translate orientation rotation mul rotate width 2 div neg height 2 div translate xoffset inch yoffset inch neg translate margin 2 div dup neg translate magnification dup aspectratio mul scale scaling scaling scale addmetrics 0 0 moveto } def /pagedimensions { useclippath userdict /gotpagebbox known not and { /pagebbox [clippath pathbbox newpath] def roundpage currentdict /roundpagebbox known and {roundpagebbox} if } if pagebbox aload pop 4 -1 roll exch 4 1 roll 4 copy landscape {4 2 roll} if sub /width exch def sub /height exch def add 2 div /xcenter exch def add 2 div /ycenter exch def userdict /gotpagebbox true put } def /addmetrics { /Symbol /S null Sdefs cf /Times-Roman /S1 StandardEncoding dup length array copy S1defs cf } def /pagesetup { /page exch def currentdict /pagedict known currentdict page known and { page load pagedict exch get cvx exec } if } def /decodingdefs [ {counttomark 2 idiv {y moveto show} repeat} {neg /y exch def counttomark 2 idiv {y moveto show} repeat} {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} {counttomark 2 idiv {y moveto show} repeat} {neg setfunnytext} ] def /setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def /w {neg moveto show} bind def /m {neg dup /y exch def moveto} bind def /done {/lastpage where {pop lastpage} if} def /f { dup /font exch def findfont exch dup /ptsize exch def scaling div dup /size exch def scalefont setfont linewidth ptsize mul scaling 10 mul div setlinewidth /spacewidth ( ) stringwidth pop def } bind def /changefont { /fontheight exch def /fontslant exch def currentfont [ 1 0 fontheight ptsize div fontslant sin mul fontslant cos div fontheight ptsize div 0 0 ] makefont setfont } bind def /sf {f} bind def /cf { dup length 2 idiv /entries exch def /chtab exch def /newencoding exch def /newfont exch def findfont dup length 1 add dict /newdict exch def {1 index /FID ne {newdict 3 1 roll put}{pop pop} ifelse} forall newencoding type /arraytype eq {newdict /Encoding newencoding put} if newdict /Metrics entries dict put newdict /Metrics get begin chtab aload pop 1 1 entries {pop def} for newfont newdict definefont pop end } bind def % % A few arrays used to adjust reference points and character widths in some % of the printer resident fonts. If square roots are too high try changing % the lines describing /radical and /radicalex to, % % /radical [0 -75 550 0] % /radicalex [-50 -75 500 0] % % Move braceleftbt a bit - default PostScript character is off a bit. % /Sdefs [ /bracketlefttp [201 500] /bracketleftbt [201 500] /bracketrighttp [-81 380] /bracketrightbt [-83 380] /braceleftbt [203 490] /bracketrightex [220 -125 500 0] /radical [0 0 550 0] /radicalex [-50 0 500 0] /parenleftex [-20 -170 0 0] /integral [100 -50 500 0] /infinity [10 -75 730 0] ] def /S1defs [ /underscore [0 80 500 0] /endash [7 90 650 0] ] def % % Tries to round clipping path dimensions, as stored in array pagebbox, so they % match one of the known sizes in the papersizes array. Lower left coordinates % are always set to 0. % /roundpagebbox { 7 dict begin /papersizes [8.5 inch 11 inch 14 inch 17 inch] def /mappapersize { /val exch def /slop .5 inch def /diff slop def /j 0 def 0 1 papersizes length 1 sub { /i exch def papersizes i get val sub abs dup diff le {/diff exch def /j i def} {pop} ifelse } for diff slop lt {papersizes j get} {val} ifelse } def pagebbox 0 0 put pagebbox 1 0 put pagebbox dup 2 get mappapersize 2 exch put pagebbox dup 3 get mappapersize 3 exch put end } bind def %%EndProlog %%BeginSetup mark /linewidth 0.5 def /#copies 1 store /landscape false def /resolution 720 def setup 2 setdecoding %%EndSetup %%Page: 1 1 /saveobj save def mark 1 pagesetup 12 B f (The Organization of Networks in Plan 9)6 2049 1 1855 1230 t 10 I f (Dave Presotto)1 574 1 2593 1470 t (Phil Winterbottom)1 742 1 2509 1590 t 10 R f (AT&T Bell Laboratories)2 993 1 2383 1770 t (Murray Hill, New Jersey 07974)4 1267 1 2246 1890 t (USA)2780 2010 w 10 I f (ABSTRACT)2643 2390 w 10 R f ( describes)1 397(In a distributed system networks are of paramount importance. This paper)10 2953 2 1330 2650 t ( network support in Plan 9.)5 1153(the implementation, design philosophy and organization of)6 2447 2 1080 2770 t ( systems, our kernel implementation,)4 1497(Topics include network requirements for distributed)5 2103 2 1080 2890 t ( of this)2 312(network naming, user interfaces and performance. We also observe that much)10 3288 2 1080 3010 t (organization is relevant to current systems.)5 1714 1 1080 3130 t 10 B f (1. Introduction)1 670 1 720 3490 t 10 R f ( portable distributed system implemented on a vari-)7 2104(Plan 9 [Pike90] is a general-purpose, multi-user,)6 1966 2 970 3646 t ( goals of this organiza-)4 935( The)1 210( distinguishes Plan 9 is its organization.)6 1623( What)1 272(ety of computers and networks.)4 1280 5 720 3766 t ( success as a dis-)4 692(tion were to reduce administration and to promote resource sharing. One of the keys to its)15 3628 2 720 3886 t (tributed system is the organization and management of its networks.)9 2725 1 720 4006 t ( file servers and CPU servers)5 1166( The)1 206( comprises file servers, CPU servers and terminals.)7 2045(A Plan 9 system)3 653 4 970 4162 t ( machines with large memories and high speed interconnects.)8 2494(are typically centrally located multiprocessor)4 1826 2 720 4282 t ( several)1 318(A variety of workstation-class machines serve as terminals connected to the central servers using)13 4002 2 720 4402 t ( hierarchy of network speeds matching)5 1584( architecture of the system demands a)6 1550( The)1 213(networks and protocols.)2 973 4 720 4522 t ( between file servers and CPU servers are high-bandwidth)8 2498( Connections)1 572(the needs of the components.)4 1250 3 720 4642 t ( from the servers fan out to local terminals using medium speed net-)12 2748( Connections)1 552(point-to-point fiber links.)2 1020 3 720 4762 t ( connections via the Internet and the)6 1561( speed)1 270( Low)1 251(works such as Ethernet [Met80] and Datakit [Fra80].)7 2238 4 720 4882 t ( and 9600 baud serial)4 890( Rate ISDN data service)4 1004( Basic)1 282(AT&T backbone serve users in Oregon and Illinois.)7 2144 4 720 5002 t (lines provide slow links to users at home.)7 1655 1 720 5122 t ( the same kernel, users may choose to run programs locally on)11 2567(Since CPU servers and terminals use)5 1503 2 970 5278 t ( organization of Plan 9 hides the details of system connec-)10 2350( The)1 207(their terminals or remotely on CPU servers.)6 1763 3 720 5398 t ( to be as distributed or central-)6 1250(tivity allowing both users and administrators to configure their environment)9 3070 2 720 5518 t ( construction of a locally represented namespace spanning)7 2332( commands support the)3 936( Simple)1 336(ized as they wish.)3 716 4 720 5638 t ( use their terminals like workstations running interac-)7 2160( work, users tend to)4 793( At)1 152(many machines and networks.)3 1215 4 720 5758 t ( and reserving the CPU servers for data or compute intensive jobs such as compiling)14 3457(tive programs locally)2 863 2 720 5878 t ( do most)2 361( home or when connected over a slow network, users tend to)11 2494( At)1 157(and computing chess endgames.)3 1308 4 720 5998 t ( of the network organization is to provide)7 1712( goal)1 206( The)1 214(work on the CPU server to minimize network traffic.)8 2188 4 720 6118 t (the same environment to the user wherever resources are used.)9 2498 1 720 6238 t 10 B f ( Network Support)2 772(2. Kernel)1 419 2 720 6478 t 10 R f ( particularly true in Plan 9 where most)7 1562(Networks play a central role in any distributed system. This is)10 2508 2 970 6634 t ( importance of the networking code within the)7 1864( The)1 207( external to the kernel.)4 903(resources are provided by servers)4 1346 4 720 6754 t ( Net-)1 230( related.)1 324(kernel is reflected by its size; of 25,000 lines of kernel code, 12,500 are network and protocol)16 3766 3 720 6874 t ( More-)1 303( devoted to communications is growing.)5 1625(works are continually being added and the fraction of code)9 2392 3 720 6994 t ( implementations consist almost entirely of synchronization)6 2460( Protocol)1 401( network code is complex.)4 1099(over, the)1 360 4 720 7114 t ( kernel currently)2 665( The)1 208( error recovery strategies.)3 1027(and dynamic memory management; areas demanding subtle)6 2420 4 720 7234 t cleartomark showpage saveobj restore %%EndPage: 1 1 %%Page: 2 2 /saveobj save def mark 2 pagesetup 10 R f (- 2 -)2 166 1 2797 480 t ( vari-)1 215( The)1 207( \(IP\) protocol suite and ISDN data service.)7 1716(supports Datakit, point-to-point fiber links, an Internet)6 2182 4 720 840 t ( addressed by other systems running on commercial)7 2170(ety of networks and machines has raised issues not)8 2150 2 720 960 t (hardware supporting only Ethernet or FDDI.)5 1780 1 720 1080 t 10 B f ( File System protocol)3 896(2.1. The)1 367 2 720 1320 t 10 R f ( process)1 326( Each)1 251( is the representation of a resource as a hierarchical file system.)11 2548(A central idea in Plan 9)5 945 4 970 1476 t ( the system by building a)5 1008(assembles a view of)3 807 2 720 1596 t 10 I f (namespace)2561 1596 w 10 R f ( systems)1 343( File)1 207([Needham] connecting its resources.)3 1460 3 3030 1596 t ( typical file)2 475( A)1 132( represent disc files; in fact, most Plan 9 file systems have no permanent storage.)14 3363(need not)1 350 4 720 1716 t ( Com-)1 281( network connections or the process table.)6 1695(system dynamically represents some resource like a set of)8 2344 3 720 1836 t ( kernel, device drivers and local or remote file servers uses a protocol called 9P.)14 3346(munication between the)2 974 2 720 1956 t ( resident device)2 630( Kernel)1 323(The protocol consists of 17 messages describing operations on files and directories.)11 3367 3 720 2076 t ( the protocol while external file servers use an RPC form.)10 2369(and protocol drivers use a procedural version of)7 1951 2 720 2196 t ( relies on several properties of the)6 1406( 9P)1 165(Nearly all traffic between Plan 9 systems consists of 9P messages.)10 2749 3 720 2316 t ( delimiters)1 444( assumes messages arrive reliably and in sequence and that)9 2515( It)1 129(underlying transport protocol.)2 1232 4 720 2436 t ( a protocol does not meet these requirements \(for example TCP)10 2659( When)1 302(between messages are preserved.)3 1359 3 720 2556 t ( provide mechanisms to marshal messages before handing them to the sys-)11 3015(does not preserve delimiters\) we)4 1305 2 720 2676 t (tem.)720 2796 w (A kernel data structure, the)4 1087 1 970 2952 t 10 I f (channel)2083 2952 w 10 R f ( generate the)2 513( on a channel)3 532( Operations)1 489(, is a handle to a file server.)7 1107 4 2399 2952 t ( The)1 206(following 9P messages.)2 949 2 720 3072 t 10 CW f (auth)1901 3072 w 10 R f (and)2167 3072 w 10 CW f (attach)2337 3072 w 10 R f ( connection, established by means)4 1362(messages authenticate a)2 955 2 2723 3072 t ( the)1 164( result is an authenticated channel referencing the root of)9 2413( The)1 221(external to 9P, and validate its user.)6 1522 4 720 3192 t (server. The)1 475 1 720 3312 t 10 CW f (clone)1222 3312 w 10 R f ( the)1 148(message makes a new channel identical to an existing channel, much like)11 2950 2 1549 3312 t 10 CW f (dup)4673 3312 w 10 R f (sys-)4879 3312 w ( a file on the server using a)7 1120( channel may be moved to)5 1076( A)1 127(tem call.)1 349 4 720 3432 t 10 CW f (walk)3423 3432 w 10 R f (message to descend each level in)5 1346 1 3694 3432 t ( The)1 218(the hierarchy.)1 561 2 720 3552 t 10 CW f (stat)1537 3552 w 10 R f (and)1815 3552 w 10 CW f (wstat)1997 3552 w 10 R f ( the file referenced by a)5 1003(messages read and write the attributes of)6 1702 2 2335 3552 t (channel. The)1 545 1 720 3672 t 10 CW f (open)1295 3672 w 10 R f ( a channel for subsequent)4 1038(message prepares)1 705 2 1565 3672 t 10 CW f (read)3339 3672 w 10 R f (and)3610 3672 w 10 CW f (write)3785 3672 w 10 R f (messages to access the)3 924 1 4116 3672 t (contents of the file.)3 801 1 720 3792 t 10 CW f (Create)1581 3792 w 10 R f (and)1976 3792 w 10 CW f (remove)2155 3792 w 10 R f ( names on the file refer-)5 1000(perform the actions implied by their)5 1490 2 2550 3792 t ( The)1 205(enced by the channel.)3 864 2 720 3912 t 10 CW f (clunk)1814 3912 w 10 R f (message discards a channel without affecting the file.)7 2134 1 2139 3912 t (A kernel resident file server called the)6 1643 1 970 4068 t 10 I f (mount driver)1 539 1 2658 4068 t 10 R f ( of 9P into)3 483(converts the procedural version)3 1315 2 3242 4068 t (RPC's. The)1 493 1 720 4188 t 10 I f (mount)1239 4188 w 10 R f (system call provides a file descriptor, which can be a pipe to a user process or a network)17 3525 1 1515 4188 t ( a mount, operations on the)5 1128( After)1 268( the mount point.)3 708(connection to a remote machine, to be associated with)8 2216 4 720 4308 t ( driver manages buffers,)3 981( mount)1 286( The)1 210(file tree below the mount point are sent as messages to the file server.)13 2843 4 720 4428 t (packs and unpacks parameters from messages and demultiplexes among processes using the file server.)13 4130 1 720 4548 t 10 B f ( Organization)1 592(2.2. Kernel)1 494 2 720 4788 t 10 R f ( processing,)1 484(The network code in the kernel is divided into three layers: hardware interface, protocol)13 3586 2 970 4944 t ( Addi-)1 292( driver typically uses streams to connect the two interface layers.)10 2676( device)1 295( A)1 132(and program interface.)2 925 5 720 5064 t ( device driver is a kernel-)5 1081( Each)1 262( modules may be pushed on a device to process protocols.)10 2446(tional stream)1 531 4 720 5184 t ( single level directory containing just a few files; for)9 2202( device drivers serve a)4 943( Simple)1 347(resident file system.)2 828 4 720 5304 t (example, we represent each UART by a data and a control file.)11 2512 1 720 5424 t 9 CW f (helix% cd /dev)2 756 1 1008 5594 t (helix% ls -l eia*)3 918 1 1008 5704 t (--rw-rw-rw- t 0 bootes bootes 0 Jul 16 17:28 eia1)9 2646 1 1008 5814 t (--rw-rw-rw- t 0 bootes bootes 0 Jul 16 17:28 eia1ctl)9 2808 1 1008 5924 t (--rw-rw-rw- t 0 bootes bootes 0 Jul 16 17:28 eia2)9 2646 1 1008 6034 t (--rw-rw-rw- t 0 bootes bootes 0 Jul 16 17:28 eia2ctl)9 2808 1 1008 6144 t (helix%)1008 6254 w 10 R f (The control file is used to control the device; writing the string)11 2561 1 720 6434 t 10 I f (b1200)3311 6434 w 10 R f (to)3591 6434 w 10 CW f (/dev/eia1ctl)3699 6434 w 10 R f ( to)1 109(sets the line)2 482 2 4449 6434 t (1200 baud.)1 444 1 720 6554 t ( example, the LANCE Ethernet)4 1276( For)1 194( present a more complex interface structure.)6 1783(Multiplexed devices)1 817 4 970 6710 t (driver serves a two level file tree \(Figure 1\) providing)9 2148 1 720 6830 t 10 S f (\267)720 6986 w 10 R f (device control and configuration)3 1300 1 970 6986 t 10 S f (\267)720 7142 w 10 R f (user-level protocols like)2 965 1 970 7142 t 10 I f (arp)1960 7142 w 10 S f (\267)720 7298 w 10 R f (diagnostic interfaces for snooping software.)4 1749 1 970 7298 t cleartomark showpage saveobj restore %%EndPage: 2 2 %%Page: 3 3 /saveobj save def mark 3 pagesetup 10 R f (- 3 -)2 166 1 2797 480 t (The top directory contains a)4 1136 1 720 840 t 10 CW f (clone)1885 840 w 10 R f (file and a directory for each connection, numbered)7 2051 1 2215 840 t 10 CW f (1)4296 840 w 10 R f (to)4386 840 w 10 CW f (n)4494 840 w 10 R f ( con-)1 207(. Each)1 279 2 4554 840 t ( the)1 149( Opening)1 396(nection directory corresponds to an Ethernet packet type.)7 2292 3 720 960 t 10 CW f (clone)3584 960 w 10 R f (file finds an unused connec-)4 1129 1 3911 960 t (tion directory and opens its)4 1124 1 720 1080 t 10 CW f (ctl)1878 1080 w 10 R f ( the)1 157( the control file returns the ASCII connection number;)8 2241(file. Reading)1 550 3 2092 1080 t ( each connection)2 670( In)1 133(user process can use this value to construct the name of the proper connection directory.)14 3517 3 720 1200 t (directory files named)2 850 1 720 1320 t 10 CW f (ctl, data, stats)2 892 1 1596 1320 t 10 R f (and)2514 1320 w 10 CW f (type)2684 1320 w 10 R f ( the string)2 402( Writing)1 362(provide access to the connection.)4 1326 3 2950 1320 t 10 I f (connect 2048)1 544 1 720 1440 t 10 R f (to the)1 234 1 1298 1440 t 10 CW f (ctl)1566 1440 w 10 R f ( to 2048 and configures the connection to receive all IP)10 2287(file sets the packet type)4 973 2 1780 1440 t ( reads of the file)4 712( Subsequent)1 527( the machine.)2 567(packets sent to)2 618 4 720 1560 t 10 CW f (type)3185 1560 w 10 R f (yield the string)2 632 1 3466 1560 t 10 I f (2048)4139 1560 w 10 R f (. The)1 246 1 4339 1560 t 10 CW f (data)4626 1560 w 10 R f (file)4907 1560 w ( the file queues a packet)5 976( Writing)1 364( returns the next packet of the selected type.)8 1778(accesses the media; reading it)4 1202 4 720 1680 t ( The)1 227( packet type.)2 551(for transmission after appending a packet header containing the source address and)11 3542 3 720 1800 t 10 CW f (stats)720 1920 w 10 R f ( interface address, packet input/output counts, error statistics)7 2463(file returns ASCII text containing the)5 1525 2 1052 1920 t (and general information about the state of the interface.)8 2214 1 720 2040 t ( ctl)1 -465(ctl data)1 -241 2 2743 3330 t cleartomark saveobj restore %%BeginGlobal % % Version 3.3.2 drawing procedures for dpost. Automatically pulled in when % needed. % /inpath false def /savematrix matrix def /Dl { inpath {pop pop neg lineto} {newpath neg moveto neg lineto stroke} ifelse } bind def /De { /y1 exch 2 div def /x1 exch 2 div def /savematrix savematrix currentmatrix def neg exch x1 add exch translate x1 y1 scale 0 0 1 0 360 inpath {1 0 moveto arc savematrix setmatrix} {newpath arc savematrix setmatrix stroke} ifelse } bind def /Da { /dy2 exch def /dx2 exch def /dy1 exch def /dx1 exch def dy1 add neg exch dx1 add exch dx1 dx1 mul dy1 dy1 mul add sqrt dy1 dx1 neg atan dy2 neg dx2 atan inpath {arc} {newpath arc stroke} ifelse } bind def /DA { /dy2 exch def /dx2 exch def /dy1 exch def /dx1 exch def dy1 add neg exch dx1 add exch dx1 dx1 mul dy1 dy1 mul add sqrt dy1 dx1 neg atan dy2 neg dx2 atan inpath {arcn} {newpath arcn stroke} ifelse } bind def /Ds { /y2 exch def /x2 exch def /y1 exch def /x1 exch def /y0 exch def /x0 exch def x0 5 x1 mul add 6 div y0 5 y1 mul add -6 div x2 5 x1 mul add 6 div y2 5 y1 mul add -6 div x1 x2 add 2 div y1 y2 add -2 div inpath {curveto} {newpath x0 x1 add 2 div y0 y1 add -2 div moveto curveto stroke} ifelse } bind def %%EndGlobal /saveobj save def mark 10 R f 4347 3181 4175 2893 Dl 3888 3181 4060 2893 Dl (. . .)2 125 1 3509 2812 t (clone)1447 2841 w (ether)2550 2294 w 4117 2662 2735 2374 Dl 3023 2662 2678 2374 Dl 2217 2662 2620 2374 Dl 1584 2662 2563 2374 Dl ( 1)1 -835(n 2)1 -1016 2 4093 2841 t 3253 3181 3081 2893 Dl 2794 3181 2966 2893 Dl 2447 3181 2275 2893 Dl 1987 3181 2159 2893 Dl ( data)1 -600(data ctl)1 -328 2 4265 3330 t ( on an interface are configured for a particular packet type each receives a copy)14 3193(If several connections)2 877 2 970 3544 t ( special packet type,)3 821( The)1 209(of the incoming packets.)3 994 3 720 3664 t 10 CW f (-1)2773 3664 w 10 R f ( the strings)2 445( Writing)1 364(, selects all packets.)3 799 3 2893 3664 t 10 I f (promiscuous)4529 3664 w 10 R f (and)720 3784 w 10 I f (connect -1)1 418 1 889 3784 t 10 R f (to the)1 225 1 1332 3784 t 10 CW f (ctl)1582 3784 w 10 R f (file configures a conversation to receive all packets on the Ethernet.)10 2707 1 1787 3784 t ( a device as a set of files using)8 1222(Although the driver interface may seem elaborate, the representation of)9 2848 2 970 3940 t ( mechanism supporting remote access to)5 1692( Any)1 237( communication has several advantages.)4 1665(ASCII strings for)2 726 4 720 4060 t ( ASCII strings to con-)4 903( Using)1 294( as gateways.)2 539(files immediately allows a remote machine to use our interfaces)9 2584 4 720 4180 t (trol the interface avoids byte order problems and ensures a uniform representation for devices on the same)16 4320 1 720 4300 t ( dissimilar devices by the same set of files)8 1823( Representing)1 594( remotely.)1 422(machine and even devices accessed)4 1481 4 720 4420 t ( like)1 182( Programs)1 440( interfaces.)1 444(allows common tools to serve several networks or)7 2056 4 720 4540 t 10 CW f (stty)3874 4540 w 10 R f (are replaced by)2 622 1 4146 4540 t 10 CW f (echo)4800 4540 w 10 R f (and shell redirection.)2 840 1 720 4660 t 10 B f ( devices)1 330(2.3. Protocol)1 560 2 720 4900 t 10 R f ( device)1 305( Protocol)1 409( as pseudo-devices called protocol devices.)5 1818(Network connections are represented)3 1538 4 970 5056 t ( IL,)1 172( Datakit URP protocol and for each of the Internet IP protocols TCP, UDP, and IL.)15 3357(drivers exist for the)3 791 3 720 5176 t ( All)1 183( protocol used by Plan 9 for transmitting file system RPC's.)10 2442(described below, is a new communication)5 1695 3 720 5296 t (protocol devices look identical so user programs contain no network-specific code.)10 3313 1 720 5416 t ( top)1 155( The)1 207(Each protocol device driver serves a directory structure similar to that of the Ethernet driver.)14 3708 3 970 5572 t (directory contains a)2 811 1 720 5692 t 10 CW f (clone)1568 5692 w 10 R f ( directory for each connection numbered)5 1675(file and a)2 395 2 1905 5692 t 10 CW f (1)4011 5692 w 10 R f (to)4107 5692 w 10 CW f (n)4221 5692 w 10 R f ( connection)1 474(. Each)1 285 2 4281 5692 t ( look at a TCP)4 622( A)1 133( send and receive information.)4 1255(directory contains files to control one connection and to)8 2310 4 720 5812 t (connection directory provides the following:)4 1781 1 720 5932 t cleartomark showpage saveobj restore %%EndPage: 3 3 %%Page: 4 4 /saveobj save def mark 4 pagesetup 10 R f (- 4 -)2 166 1 2797 480 t 9 CW f (helix% cd /net/tcp/2)2 1080 1 1008 830 t (helix% ls -l)2 648 1 1008 940 t ( 0 Jul 13 21:14 ctl)5 1026( bootes)1 540(--rw-rw---- I 0 ehg)3 1026 3 1008 1050 t ( 0 Jul 13 21:14 data)5 1080( bootes)1 540(--rw-rw---- I 0 ehg)3 1026 3 1008 1160 t ( 0 Jul 13 21:14 listen)5 1188( bootes)1 540(--rw-rw---- I 0 ehg)3 1026 3 1008 1270 t (--r--r--r-- I 0 bootes bootes 0 Jul 13 21:14 local)9 2700 1 1008 1380 t (--r--r--r-- I 0 bootes bootes 0 Jul 13 21:14 remote)9 2754 1 1008 1490 t (--r--r--r-- I 0 bootes bootes 0 Jul 13 21:14 status)9 2754 1 1008 1600 t (helix% cat local remote status)4 1620 1 1008 1710 t (135.104.9.31 5012)1 918 1 1008 1820 t (135.104.53.11 564)1 918 1 1008 1930 t (tcp/2 1 Established connect)3 1458 1 1008 2040 t (helix%)1008 2150 w 10 R f (The files)1 354 1 720 2330 t 10 CW f (local, remote)1 747 1 1101 2330 t 10 R f (and)1875 2330 w 10 CW f (status)2046 2330 w 10 R f ( The)1 208(supply information about the state of the connection.)7 2130 2 2434 2330 t 10 CW f (data)4800 2330 w 10 R f (and)720 2450 w 10 CW f (ctl)890 2450 w 10 R f ( The)1 206(files provide access to the process end of the stream implementing the protocol.)12 3193 2 1096 2450 t 10 CW f (listen)4521 2450 w 10 R f (file)4907 2450 w (is used to accept incoming calls from the network.)8 2011 1 720 2570 t (The following steps establish a connection.)5 1726 1 970 2726 t ( clone device of the appropriate protocol directory is opened to reserve an unused connection.)14 3738(1\) The)1 405 2 720 2882 t ( file descriptor returned by the open points to the)9 2004(2\) The)1 405 2 720 3038 t 10 CW f (ctl)3161 3038 w 10 R f ( that)1 182( Reading)1 390(file of the new connection.)4 1095 3 3373 3038 t (file descriptor returns an ASCII string containing the connection number.)9 2929 1 970 3158 t ( protocol/network specific ASCII address string is written to the)9 2561(3\) A)1 322 2 720 3314 t 10 CW f (ctl)3628 3314 w 10 R f (file.)3833 3314 w ( path of the)3 509(4\) The)1 405 2 720 3470 t 10 CW f (data)1678 3470 w 10 R f ( the)1 166( When)1 307(file is constructed using the connection number.)6 2031 3 1962 3470 t 10 CW f (data)4510 3470 w 10 R f (file is)1 245 1 4795 3470 t (opened the connection is established.)4 1484 1 970 3590 t ( the pro-)2 342( If)1 118( network.)1 379(A process can read and write this file descriptor to send and receive messages from the)15 3481 4 720 3746 t (cess opens the)2 589 1 720 3866 t 10 CW f (listen)1343 3866 w 10 R f ( address string written to the)5 1175( An)1 180( call is received.)3 672(file it blocks until an incoming)5 1276 4 1737 3866 t 10 CW f (ctl)720 3986 w 10 R f ( an incoming)2 528( When)1 291( process is prepared to accept.)5 1211(file before the listen selects the ports or services the)9 2083 4 927 3986 t ( the open completes and returns a file descriptor pointing to the)11 2538(call is received,)2 627 2 720 4106 t 10 CW f (ctl)3911 4106 w 10 R f (file of the new connec-)4 923 1 4117 4106 t ( the)1 149(tion. Reading)1 566 2 720 4226 t 10 CW f (ctl)1462 4226 w 10 R f ( construct the path of the)5 1005(file yields a connection number used to)6 1582 2 1669 4226 t 10 CW f (data)4284 4226 w 10 R f ( con-)1 205(file. A)1 283 2 4552 4226 t ( directory are referenced or until a close)7 1605(nection remains established while any of the files in the connection)10 2715 2 720 4346 t (is received from the network.)4 1172 1 720 4466 t 10 B f (2.4. Streams)1 549 1 720 4706 t 10 R f (A)970 4862 w 10 I f (stream)1069 4862 w 10 R f ( or pseudo-device to user)4 1015([Rit84a][Presotto] is a bidirectional channel connecting a physical)7 2657 2 1368 4862 t ( processes acting on)3 810( Kernel)1 324( user processes insert and remove data at one end of the stream.)12 2571(processes. The)1 615 4 720 4982 t ( communications channels such as pipes, TCP)6 1858( Asynchronous)1 629( device insert data at the other end.)7 1405(behalf of a)2 428 4 720 5102 t (conversations, Datakit conversations, and RS232 lines are implemented using streams.)9 3463 1 720 5222 t (A stream comprises a linear list of)6 1400 1 970 5378 t 10 I f (processing modules)1 796 1 2400 5378 t 10 R f ( both an upstream \(toward)4 1072( module has)2 493(. Each)1 279 3 3196 5378 t ( and downstream \(toward the device\))5 1547(the process\))1 493 2 720 5498 t 10 I f (put routine)1 455 1 2798 5498 t 10 R f ( the put routine of the module on)7 1404(. Calling)1 383 2 3253 5498 t ( the succeeding one to send data up)7 1439( module calls)2 539( Each)1 252(either end of the stream inserts data into the stream.)9 2090 4 720 5618 t (or down the stream.)3 793 1 720 5738 t (An instance of a processing module is represented by a pair of)11 2552 1 970 5894 t 10 I f (Queues)3554 5894 w 10 R f ( The)1 212(, one for each direction.)4 975 2 3853 5894 t ( Some)1 281( can be used to queue information traveling along the stream.)10 2473(queues point to the put procedures and)6 1566 3 720 6014 t ( queue data locally and send it along the stream at some later time either due to a subsequent)18 3838(put routines)1 482 2 720 6134 t ( modules cre-)2 545( Processing)1 484( retransmission timer or a device interrupt.)6 1706(call or an asynchronous event such as a)7 1585 4 720 6254 t ( example, a helper)3 755( For)1 197( for handling asynchronous events.)4 1427(ate helper kernel processes to provide a context)7 1941 4 720 6374 t ( use of kernel pro-)4 739( The)1 207( periodically to perform any necessary TCP retransmissions.)7 2427(kernel process awakens)2 947 4 720 6494 t ( Unix)1 243(cesses instead of serialized run-to-completion service routines differs from the implementation of)11 4077 2 720 6614 t ( lack a local long-lived)4 959( service routines cannot use any blocking kernel resource and they)10 2769(streams. Unix)1 592 3 720 6734 t ( kernel processes solve these problems and simplify the stream code.)10 2748(state. Helper)1 529 2 720 6854 t ( processing module must ensure that con-)6 1701( Each)1 256( no implicit synchronization in our streams.)6 1783(There is)1 330 4 970 7010 t ( maximizes concurrency but introduces the possi-)6 1986( This)1 229( the stream are synchronized.)4 1170(current processes using)2 935 4 720 7130 t ( programming; to date they have not)6 1508( deadlocks are easily avoided by careful)6 1643( However)1 423(bility of deadlock.)2 746 4 720 7250 t cleartomark showpage saveobj restore %%EndPage: 4 4 %%Page: 5 5 /saveobj save def mark 5 pagesetup 10 R f (- 5 -)2 166 1 2797 480 t (caused us problems.)2 807 1 720 840 t (Information is represented by linked lists of kernel structures called)9 2788 1 970 996 t 10 I f (blocks)3793 996 w 10 R f ( block contains a)3 707(. Each)1 285 2 4048 996 t ( buffers can hold either data or control)7 1623( Block)1 302(type, some state flags, and pointers to an optional buffer.)9 2395 3 720 1116 t ( and block buffers are dynamically allocated)6 1797( Blocks)1 332(information, i.e., directives to the processing modules.)6 2191 3 720 1236 t (from kernel memory.)2 851 1 720 1356 t 10 B f ( Interface)1 412(2.4.1. User)1 474 2 720 1596 t 10 R f ( user level as two files,)5 935(A stream is represented at)4 1048 2 970 1752 t 10 CW f (ctl)2982 1752 w 10 R f (and)3191 1752 w 10 CW f (data)3364 1752 w 10 R f ( actual names can be changed)5 1202(. The)1 234 2 3604 1752 t ( first pro-)2 383( The)1 208(by the device driver using the stream, as we saw earlier in the example of the UART driver.)17 3729 3 720 1872 t ( to the)2 268( Writing)1 370( last close destroys it.)4 894( The)1 214( file creates the stream automatically.)5 1536(cess to open either)3 764 6 720 1992 t 10 CW f (data)4800 1992 w 10 R f ( the data into kernel blocks and passes them to the downstream put routine of the first processing)17 3904(file copies)1 416 2 720 2112 t ( writes to the)3 525( Concurrent)1 501( be contained by a single block.)6 1274( write of less than 32K is guaranteed to)8 1572(module. A)1 448 5 720 2232 t ( atomic writes for most protocols.)5 1399(same stream are not synchronized although the 32K block size assures)10 2921 2 720 2352 t ( modules that care about write bound-)6 1532(The last block written is flagged with a delimiter to alert downstream)11 2788 2 720 2472 t ( the first put routine calls the second, the second calls the third, and so on until the data)18 3510( most cases)2 461(aries. In)1 349 3 720 2592 t ( a consequence most data is output without context switching.)9 2476( As)1 161(is output.)1 373 3 720 2712 t (Reading from the)2 709 1 970 2868 t 10 CW f (data)1709 2868 w 10 R f ( read terminates when)3 896( The)1 211( the stream.)2 475(file returns data queued at the top of)7 1479 4 1979 2868 t ( per stream read lock)4 888( A)1 135( reached or when the end of a delimited block is encountered.)11 2598(the read count is)3 699 4 720 2988 t ( at a time and guarantees that the bytes read were contigu-)11 2363(ensures only one process can read from a stream)8 1957 2 720 3108 t (ous bytes from the stream.)4 1057 1 720 3228 t ( stream system inter-)3 850( The)1 210( bltj ] Plan 9 streams can be dynamically configured.)9 2153(Like UNIX streams [)3 857 4 970 3384 t (cepts and interprets the following control blocks:)6 1959 1 720 3504 t (push)720 3660 w 10 I f (name)934 3660 w 10 R f (adds an instance of the processing module)6 1686 1 1320 3660 t 10 I f (name)3031 3660 w 10 R f (to the top of the stream.)5 949 1 3272 3660 t ( the top module of the stream.)6 1196(pop removes)1 938 2 720 3816 t ( a hangup message up the stream from the device end.)10 2159(hangup sends)1 822 2 720 3972 t (Other control blocks are module-specific and are interpreted by each processing module as they pass.)14 4043 1 720 4128 t (The convoluted syntax and semantics of the UNIX)7 2034 1 970 4284 t 10 CW f (ioctl)3030 4284 w 10 R f (system call convinced us to leave it out of)8 1684 1 3356 4284 t ( Instead,)1 374(Plan 9.)1 289 2 720 4404 t 10 CW f (ioctl)1419 4404 w 10 R f (is replaced by the)3 734 1 1755 4404 t 10 CW f (ctl)2525 4404 w 10 R f ( to the)2 272(file. Writing)1 530 2 2741 4404 t 10 CW f (ctl)3579 4404 w 10 R f ( to writing to a)4 629(file is identical)2 616 2 3795 4404 t 10 CW f (data)720 4524 w 10 R f ( of type)2 327(file except the blocks are)4 1037 2 995 4524 t 10 I f (control)2395 4524 w 10 R f ( processing module parses each control block it sees.)8 2198(. A)1 158 2 2684 4524 t ( not an issue when one system controls)7 1592(Commands in control blocks are ASCII strings, so byte ordering is)10 2728 2 720 4644 t ( time to parse control blocks is not impor-)8 1701( The)1 208( on another processor.)3 890(streams in a name space implemented)5 1521 4 720 4764 t (tant, since control operations are rare.)5 1504 1 720 4884 t 10 B f ( Interface)1 412(2.4.2. Device)1 557 2 720 5124 t 10 R f ( particulars of the)3 716( The)1 210( of a device interface.)4 880(The module at the downstream end of the stream is part)10 2264 4 970 5280 t ( consist of an interrupt routine, an output put routine,)9 2136( device interfaces)2 703( Most)1 259(interface vary with the device.)4 1222 4 720 5400 t ( starts the device if it is stopped.)7 1309( output put routine stages data for the device and)9 1962( The)1 207(and a kernel process.)3 842 4 720 5520 t ( device has input to be processed or needs)8 1722(The interrupt routine wakes up the kernel process whenever the)9 2598 2 720 5640 t ( The)1 207( or stages more data for output.)6 1257( kernel process puts information up the stream)7 1857( The)1 206(more output staged.)2 793 5 720 5760 t ( interrupt level.)2 615(division of labor among the different pieces varies depending on how much must be done at)15 3705 2 720 5880 t ( a pro-)2 264(However, the interrupt routine may not allocate blocks or call a put routine since both actions require)16 4056 2 720 6000 t (cess context.)1 510 1 720 6120 t 10 B f (2.4.3. Multiplexing)1 826 1 720 6360 t 10 R f ( push)1 216( We)1 190( onto a single physical wire.)5 1131(The conversations using a protocol device must be multiplexed)8 2533 4 970 6516 t ( device)1 294( The)1 214(a multiplexor processing module onto the physical device stream to group the conversations.)12 3812 3 720 6636 t ( add the necessary header onto downstream messages and then put them)11 2946(end modules on the conversations)4 1374 2 720 6756 t ( module looks at each message moving up)7 1711( multiplexing)1 541( The)1 209(to the module downstream of the multiplexor.)6 1859 4 720 6876 t ( controlling the demulti-)3 999(its stream and puts it to the correct conversation stream after stripping the header)13 3321 2 720 6996 t (plexing.)720 7116 w ( major difference is that we)5 1134( The)1 213( implementation of multiplexor streams.)4 1640(This is similar to the Unix)5 1083 4 970 7272 t cleartomark showpage saveobj restore %%EndPage: 5 5 %%Page: 6 6 /saveobj save def mark 6 pagesetup 10 R f (- 6 -)2 166 1 2797 480 t ( attempt to produce a generalized multi-)6 1633( Each)1 255(have no general structure that corresponds to a multiplexor.)8 2432 3 720 840 t ( this mecha-)2 502(plexor created a more complicated structure and underlined the basic difficulty of generalzing)12 3818 2 720 960 t ( now code each multiplexor from scratch and favour simplicity over generality.)11 3166(nism. We)1 408 2 720 1080 t 10 B f (2.4.4. Reflections)1 746 1 720 1320 t 10 R f ( year's experience and the efforts of many programmers, we remain dissatisfied with the)13 3582(Despite five)1 488 2 970 1476 t ( device interfaces)2 709( is not an issue; the time to process protocols and drive)11 2267( Performance)1 566(stream mechanism.)1 778 4 720 1596 t ( the mechanism)2 637( However)1 420(continues to dwarf the time spent allocating, freeing, and moving blocks of data.)12 3263 3 720 1716 t ( make streams dynami-)3 950( of the complexity results from our efforts to)8 1845( Much)1 291(remains inordinately complex.)2 1234 4 720 1836 t ( processing modules on different devices and to provide kernel synchronization)10 3222(cally configurable, to reuse)3 1098 2 720 1956 t ( use)1 172( is particularly irritating since we seldom)6 1727( This)1 243(to ensure data structures don't disappear under foot.)7 2178 4 720 2076 t (these properties.)1 654 1 720 2196 t ( Peterson's)1 449( Larry)1 278(Streams remain in our kernel because we are unable to devise a better alternative.)13 3343 3 970 2352 t ( we were to)3 501( If)1 129( switch.)1 324(X-kernel [Pet89a] is the closest contender but doesn't offer enough advantage to)11 3366 4 720 2472 t ( large fixed number of con-)5 1129(rewrite the streams code, we would probably statically allocate resources for a)11 3191 2 720 2592 t (versations and burn memory in favor of less complexity.)8 2261 1 720 2712 t 10 B f ( IL Protocol)2 516(3. The)1 292 2 720 2952 t 10 R f ( suitable for transmission of 9P messages over an Ethernet or)10 2531(None of the standard IP protocols are)6 1539 2 970 3108 t ( while cheap, does not pro-)5 1106( UDP,)1 280( has a high overhead and does not preserve delimiters.)9 2207( TCP)1 239(the Internet.)1 488 5 720 3228 t ( of the system used a custom protocol that was efficient but)11 2383( versions)1 358( Early)1 266(vide reliable sequenced delivery.)3 1313 4 720 3348 t ( implemented IP, TCP and UDP we looked around)8 2069( we)1 147( When)1 294(unsatisfactory for internetwork transmission.)3 1810 4 720 3468 t (for a suitable replacement with the following properties:)7 2249 1 720 3588 t 10 S f (\267)720 3744 w 10 R f (Reliable datagram service with sequenced delivery)5 2031 1 970 3744 t 10 S f (\267)720 3900 w 10 R f (Runs over IP)2 522 1 970 3900 t 10 S f (\267)720 4056 w 10 R f (Low complexity, high performance)3 1414 1 970 4056 t 10 S f (\267)720 4212 w 10 R f (Adaptive timeouts)1 736 1 970 4212 t ( protocol designed to be encapsu-)5 1364( is a lightweight)3 654( IL)1 148(None met our needs so a new protocol was designed.)9 2154 4 720 4368 t ( a connection-based protocol providing reliable transmission of sequenced messages)9 3567( is)1 115( It)1 134(lated by IP.)2 504 4 720 4488 t ( for flow control since the protocol is designed to transport RPC)11 2628( provision is made)3 751( No)1 177(between machines.)1 764 4 720 4608 t ( small outstanding message window prevents too many incoming)8 2698( A)1 133( and server.)2 484(messages between client)2 1005 4 720 4728 t ( discarded and must be retransmitted.)5 1587(messages from being buffered; messages outside the window are)8 2733 2 720 4848 t ( end of the con-)4 654(Connection setup uses a two way handshake to generate initial sequence numbers at each)13 3666 2 720 4968 t ( to resequence out)3 729(nection; subsequent data messages increment the sequence numbers allowing the receiver)10 3591 2 720 5088 t ( a message is lost)4 714( If)1 121( In contrast to other protocols, IL does not do blind retransmission.)11 2728(of order messages.)2 757 4 720 5208 t ( message containing)2 828( query message is a small control)6 1374( The)1 213(and a timeout occurs, a query message is sent.)8 1905 4 720 5328 t ( retransmitting)1 596( receiver responds to a query by)6 1340( The)1 216(the current sequence numbers as seen by the sender.)8 2168 4 720 5448 t ( the protocol to behave well in congested networks, where blind retransmis-)11 3061( allows)1 288( This)1 230(missing messages.)1 741 4 720 5568 t ( round-trip timer is used to)5 1119( A)1 132( TCP, IL has adaptive timeouts.)5 1319( Like)1 243(sion would cause further congestion.)4 1507 5 720 5688 t ( allows the protocol to)4 906( This)1 231( terms of the network speed.)5 1146(calculate acknowledge and retransmission times in)5 2037 4 720 5808 t (perform well on both the Internet and on local Ethernets.)9 2268 1 720 5928 t ( entire protocol is 847)4 881( The)1 206( with the minimalist design of the rest of the kernel, IL is small.)13 2559(In keeping)1 424 4 970 6084 t ( is our protocol of choice.)5 1026( IL)1 144(lines of code, compared to 2200 lines for TCP.)8 1870 3 720 6204 t 10 B f ( Addressing)1 509(4. Network)1 496 2 720 6444 t 10 R f ( and devices is not sufficient to support the transparency we require.)11 2766(A uniform interface to protocols)4 1304 2 970 6600 t ( written to a control file have no)7 1319(Since each network uses a different addressing scheme, the ASCII strings)10 3001 2 720 6720 t ( is capable of addressing.)4 1010( a result, every tool must know the specifics of the networks it)12 2483( As)1 161(common format.)1 666 4 720 6840 t ( each user must be aware of the)7 1289(Moreover, since each machine supplies a subset of the available networks,)10 3031 2 720 6960 t ( is obviously unacceptable.)3 1082( This)1 228(networks supported by every terminal and server machine.)7 2339 3 720 7080 t ( could)1 260( We)1 201( one deserves more discussion.)4 1286(Several possible solutions were considered and rejected;)6 2323 4 970 7236 t cleartomark showpage saveobj restore %%EndPage: 6 6 %%Page: 7 7 /saveobj save def mark 7 pagesetup 10 R f (- 7 -)2 166 1 2797 480 t ( nam-)1 231(have used a user-level file server to represent the network namespace as a Plan 9 file tree. This global)18 4089 2 720 840 t ( file hierarchy provides paths to direc-)6 1554( The)1 210( systems.)1 372(ing scheme has been implemented in other distributed)7 2184 4 720 960 t ( names of the machines)4 949( directory contains files representing the)5 1625( Each)1 253(tories representing network domains.)3 1493 4 720 1080 t ( might be the path)4 738(in that domain; an example)4 1100 2 720 1200 t 10 CW f (/net/name/usa/edu/mit/ai)2587 1200 w 10 R f ( machine file con-)3 735(. Each)1 278 2 4027 1200 t ( representation for several reasons.)4 1423( rejected this)2 530( We)1 198(tains information like the IP address of the machine.)8 2169 4 720 1320 t ( a hierarchy encompassing all representations of the various network addressing)10 3303(First, it is hard to devise)5 1017 2 720 1440 t ( the)1 150( Second,)1 373( and Ethernet address strings have nothing in common.)8 2227( Datakit)1 348(schemes in a uniform manner.)4 1222 5 720 1560 t ( to connect to a service on the)7 1252(address of a machine is often only a small part of the information required)13 3068 2 720 1680 t ( protocols require symbolic service names to be mapped into numeric port)11 3075( example, the IP)3 682(machine. For)1 563 3 720 1800 t ( to represent in)3 623( of this sort is hard)5 787( Information)1 535(numbers, some of which are privileged and hence special.)8 2375 4 720 1920 t ( users with)2 435( the size and number of the networks being represented burdens)10 2564( Finally,)1 361(terms of file operations.)3 960 4 720 2040 t ( In)1 135(an unacceptably large amount of information about the organization of the network and its connectivity.)14 4185 2 720 2160 t (this case the Plan 9 representation of a resource as a file is not appropriate.)14 2979 1 720 2280 t ( server on)2 397( A)1 124(If tools are to be network independent, a third-party server must resolve network names.)13 3549 3 970 2436 t ( machine or)2 481(each machine, with local knowledge, can select the best network for any particular destination)13 3839 2 720 2556 t ( differs between)2 658( the network devices present a common interface, the only operation which)11 3076(service. Since)1 586 3 720 2676 t ( to the path of the clone file of a protocol)10 1646( symbolic name must be translated)5 1395( A)1 124(networks is name resolution.)3 1155 4 720 2796 t (device and an ASCII address string to write to the)9 1994 1 720 2916 t 10 CW f (ctl)2739 2916 w 10 R f ( connection server \(CS\) provides this service.)6 1816(file. A)1 280 2 2944 2916 t 10 B f ( Database)1 419(4.1. Network)1 571 2 720 3156 t 10 R f ( as)1 137(On most systems several files such)5 1536 2 970 3312 t 10 CW f (/etc/hosts)2697 3312 w 10 R f (,)3297 3312 w 10 CW f (/etc/networks)3376 3312 w 10 R f (,)4156 3312 w 10 CW f (/etc/services)4235 3312 w 10 R f (,)5015 3312 w 10 CW f (/etc/hosts.equiv)720 3432 w 10 R f (,)1680 3432 w 10 CW f (/etc/bootptab)1734 3432 w 10 R f (, and)1 198 1 2514 3432 t 10 CW f (/etc/named.d)2741 3432 w 10 R f ( time)1 206( Much)1 286(hold network information.)2 1058 3 3490 3432 t ( attempt to auto-)3 679( Tools)1 285( keeping them mutually consistent.)4 1425(and effort is spent administering these files and)7 1931 4 720 3552 t ( of the files from information in other files but maintenance continues to be)13 3127(matically derive one or more)4 1193 2 720 3672 t (difficult and error prone.)3 986 1 720 3792 t ( database on a)3 613( One)1 232(Since we wrote our world from scratch, we decided to avoid this nightmare.)12 3225 3 970 3948 t ( ASCII files comprise)3 904( Two)1 243(shared server contains all the information needed for network administration.)9 3173 3 720 4068 t (the main database:)2 955 1 720 4188 t 10 CW f (/lib/ndb/local)1806 4188 w 10 R f ( information and)2 880(contains locally administered)2 1383 2 2777 4188 t 10 CW f (/lib/ndb/global)720 4308 w 10 R f ( sets of)2 383( files contain)2 618( The)1 256(contains information imported from elsewhere.)4 2087 4 1696 4308 t (attribute/value pairs of the form)4 1314 1 720 4428 t 10 I f (attr=value)2070 4428 w 10 R f (, where)1 304 1 2499 4428 t 10 I f (attr)2840 4428 w 10 R f (and)3022 4428 w 10 I f (value)3203 4428 w 10 R f ( are)1 158( Systems)1 396(are alphanumeric strings.)2 1030 3 3456 4428 t ( by zero or more)4 671(described by multi-line entries; a header line at the left margin begins each entry followed)14 3649 2 720 4548 t ( example, the entry for our)5 1109( For)1 197(indented attribute/value pairs specifying names, addresses, properties, etc.)7 3014 3 720 4668 t ( address, a boot file, and)5 983(CPU server specifies a domain name, an IP address, an Ethernet address, a Datakit)13 3337 2 720 4788 t (supported protocols.)1 816 1 720 4908 t 9 CW f (sys = helix)2 594 1 1008 5078 t (dom=helix.research.att.com)1440 5188 w (bootf=/mips/9power)1440 5298 w (ip=135.104.9.31 ether=0800690222f0)1 1836 1 1440 5408 t (dk=nj/astro/helix)1440 5518 w (proto=il flavor=9cpu)1 1080 1 1440 5628 t 10 R f ( that information with the)4 1062(If several systems share entries such as network mask and gateway, we specify)12 3258 2 720 5808 t ( following entries define a class B IP network and a few)11 2270( The)1 209(network or subnetwork instead of the system.)6 1841 3 720 5928 t ( the network specifies the IP mask, file system, and authentication)10 2741( entry for)2 389( The)1 214(subnets derived from it.)3 976 4 720 6048 t ( subnetwork specifies its default IP gateway.)6 1783( Each)1 249(server for all systems on the network.)6 1500 3 720 6168 t cleartomark showpage saveobj restore %%EndPage: 7 7 %%Page: 8 8 /saveobj save def mark 8 pagesetup 10 R f (- 8 -)2 166 1 2797 480 t 9 CW f (ipnet=mh-astro-net ip=135.104.0.0 ipmask=255.255.255.0)2 2916 1 1008 830 t (fs=bootes.research.att.com)1440 940 w (auth=1127auth)1440 1050 w (ipnet=unix-room ip=135.104.117.0)1 1728 1 1008 1160 t (ipgw=135.104.117.1)1440 1270 w (ipnet=third-floor ip=135.104.51.0)1 1782 1 1008 1380 t (ipgw=135.104.51.1)1440 1490 w (ipnet=fourth-floor ip=135.104.52.0)1 1836 1 1008 1600 t (ipgw=135.104.52.1)1440 1710 w 10 R f (Database entries also define the mapping of service names to port numbers for TCP, UDP, and IL.)16 3929 1 720 1890 t 9 CW f (tcp=echo port=7)1 1188 1 1008 2060 t (tcp=discard port=9)1 1188 1 1008 2170 t (tcp=systat port=11)1 1242 1 1008 2280 t (tcp=daytime port=13)1 1242 1 1008 2390 t 10 R f ( database directly so there are no intermediate files or binary format and consis-)13 3197(All programs read the)3 873 2 970 2606 t ( global file, containing all)4 1094( Our)1 221( become large.)2 616( the database files can)4 943( However)1 432(tency problems are rare.)3 1014 6 720 2726 t ( speed searches, we)3 816( To)1 173( lines.)1 251(information about both Datakit and Internet systems in AT&T, has 43,000)10 3080 4 720 2846 t ( entries in)2 406( hash file entries point to)5 1026( The)1 212(build hash table files for each attribute we expect to search often.)11 2676 4 720 2966 t ( master file so we can avoid using an)8 1515( hash file contains the modification time of its)8 1870( Every)1 292(the master files.)2 643 4 720 3086 t ( for attributes that aren't hashed or whose hash table is out-of-date still)12 2979( Searches)1 418(out-of-date hash table.)2 923 3 720 3206 t (work, they just take longer.)4 1093 1 720 3326 t 10 B f ( Server)1 307(4.2. Connection)1 689 2 720 3566 t 10 R f ( server process, CS, performs symbolic name to address trans-)9 2496(On each system a user level connection)6 1574 2 970 3722 t ( and other servers \(such as)5 1125( uses information about available networks, the network database,)8 2754(lation. CS)1 441 3 720 3842 t ( single file,)2 465( is a file server serving a)6 1023( CS)1 181(DNS\) to translate names.)3 1028 4 720 3962 t 10 CW f (/net/cs)3451 3962 w 10 R f ( client writes a symbolic)4 1013(. A)1 156 2 3871 3962 t (name to)1 321 1 720 4082 t 10 CW f (/net/cs)1068 4082 w 10 R f ( lines)1 215( The)1 206( system.)1 329(then reads one line for each matching destination reachable from this)10 2775 4 1515 4082 t (are of the form)3 601 1 720 4202 t 10 I f (filename message)1 709 1 1348 4202 t 10 R f (, where)1 296 1 2057 4202 t 10 I f (filename)2381 4202 w 10 R f (is the path of the clone file to open for a new connection)12 2287 1 2753 4202 t (and)720 4322 w 10 I f (message)903 4322 w 10 R f ( following example illustrates this.)4 1438( The)1 219(is the string to write to it to make the connection.)10 2103 3 1280 4322 t 10 CW f (Ndb/csquery)720 4442 w 10 R f (is a program that prompts for strings to write to /net/cs and prints the replies.)14 3067 1 1405 4442 t 9 CW f (% ndb/csquery)1 702 1 1008 4612 t (> net!helix!9fs)1 810 1 1008 4722 t (/net/il/clone 135.104.9.31!17008)1 1728 1 1008 4832 t (/net/dk/clone nj/astro/helix!9fs)1 1728 1 1008 4942 t 10 R f ( special network name)3 898( The)1 206( to perform complicated searches.)4 1353(CS provides meta-name translation)3 1407 4 970 5158 t 10 CW f (net)4860 5158 w 10 R f ( host)1 202( A)1 132( the specified service.)3 894(selects any network in common between source and destination supporting)9 3092 4 720 5278 t (name of the form)3 696 1 720 5398 t 10 I f ($attr)1443 5398 w 10 R f ( database search returns the)4 1108( The)1 208( an attribute in the network database.)6 1490(is the name of)3 569 4 1665 5398 t ( closely asso-)2 546( Most)1 260( the matching attribute/value pair most closely associated with the source host.)11 3185(value of)1 329 4 720 5518 t ( example, the symbolic name)4 1188( For)1 194( defined on a per network basis.)6 1302(ciated is)1 334 4 720 5638 t 10 I f (tcp!$auth!rexauth)3768 5638 w 10 R f (causes CS to)2 521 1 4519 5638 t (search for the)2 546 1 720 5758 t 10 I f (auth)1293 5758 w 10 R f (attribute in the database entry for the source system, then its subnetwork \(if there is one\))15 3542 1 1498 5758 t (and then its network.)3 838 1 720 5878 t 9 CW f (% ndb/csquery)1 702 1 1008 6048 t (> net!$auth!rexauth)1 1026 1 1008 6158 t (/net/il/clone 135.104.9.34!17021)1 1728 1 1008 6268 t (/net/dk/clone nj/astro/p9auth!rexauth)1 1998 1 1008 6378 t (/net/il/clone 135.104.9.6!17021)1 1674 1 1008 6488 t (/net/dk/clone nj/astro/musca!rexauth)1 1944 1 1008 6598 t 10 R f ( domain names however, CS)4 1190( For)1 200( information from its database files.)5 1481(Normally CS derives naming)3 1199 4 970 6814 t ( reachable, CS relies)3 826( no DNS is)3 451( If)1 119(first consults another user level process, the domain name server \(DNS\).)10 2924 4 720 6934 t (on its own tables.)3 700 1 720 7054 t ( name server is a user level process providing one file,)10 2280(Like CS, the domain)3 858 2 970 7210 t 10 CW f (/net/dns)4144 7210 w 10 R f ( client)1 258(. A)1 158 2 4624 7210 t cleartomark showpage saveobj restore %%EndPage: 8 8 %%Page: 9 9 /saveobj save def mark 9 pagesetup 10 R f (- 9 -)2 166 1 2797 480 t (writes a request of the form)5 1125 1 720 840 t 10 I f (domain-name type)1 744 1 1875 840 t 10 R f (, where)1 297 1 2619 840 t 10 I f (type)2945 840 w 10 R f (is a domain name service resource record type.)7 1900 1 3140 840 t ( one line per resource)4 874(DNS performs a recursive query through the Internet domain name system producing)11 3446 2 720 960 t ( client reads)2 494( The)1 211(record found.)1 543 3 720 1080 t 10 CW f (/net/dns)1999 1080 w 10 R f ( other domain name servers, DNS)5 1378( Like)1 238( records.)1 348(to retrieve the)2 566 4 2510 1080 t ( is implemented as a multi-process shared memory)7 2147( DNS)1 267( from the network.)3 794(caches information learned)2 1112 4 720 1200 t (application with separate processes listening for network and local requests.)9 3033 1 720 1320 t 10 B f ( routines)1 375(5. Library)1 464 2 720 1560 t 10 R f ( and receiving connections across a)5 1455(The section on protocol devices described the details of making)9 2615 2 970 1716 t ( routines are provided to relieve the program-)7 1871( Library)1 357( dance is straightforward but tedious.)5 1526(network. The)1 566 4 720 1836 t (mer of the details.)3 721 1 720 1956 t 10 B f (5.1. Connecting)1 689 1 720 2196 t 10 R f (The)970 2352 w 10 I f (dial)1169 2352 w 10 R f ( returns an open file)4 878( It)1 131( a connection to a remote destination.)6 1615(\(2\) library call establishes)3 1091 4 1325 2352 t (descriptor for the)2 687 1 720 2472 t 10 CW f (data)1432 2472 w 10 R f (file in the connection directory.)4 1256 1 1697 2472 t 9 CW f ( *dest, char *local, char *dir, int *cfdp\))7 2268(int dial\(char)1 756 2 1008 2642 t 10 I f (dest)720 2858 w 10 R f (is the symbolic name/address of the destination.)6 1918 1 970 2858 t 10 I f (local)720 3014 w 10 R f ( most networks do not support this, it is almost always zero.)11 2397( Since)1 272(is the local address.)3 782 3 970 3014 t 10 I f (dir)720 3170 w 10 R f ( this connection.)2 674(is a pointer to a buffer to hold the path name of the protocol directory representing)15 3396 2 970 3170 t 10 I f (Dial)970 3290 w 10 R f (fills this buffer if the pointer is non-zero.)7 1631 1 1173 3290 t 10 I f (cfdp)720 3446 w 10 R f ( for the)2 304(is a pointer to a file descriptor)6 1240 2 970 3446 t 10 CW f (ctl)2547 3446 w 10 R f ( the pointer is non-zero,)4 983( If)1 124(file of the connection.)3 900 3 2760 3446 t 10 CW f (dial)4800 3446 w 10 R f (opens the control file and tucks the file descriptor here.)9 2201 1 970 3566 t (Most programs call)2 777 1 720 3722 t 10 I f (dial)1522 3722 w 10 R f ( destination name and all other arguments zero.)7 1898(with a)1 247 2 1703 3722 t 10 I f (Dial)3899 3722 w 10 R f (uses CS to translate the)4 937 1 4103 3722 t ( to all possible destination addresses and attempts to connect to each in turn until one works.)16 3710(symbolic name)1 610 2 720 3842 t (Specifying the special name)3 1225 1 720 3962 t 10 CW f (net)2004 3962 w 10 R f ( network portion of the destination allows CS to pick a)10 2538(in the)1 259 2 2243 3962 t ( example,)1 398( For)1 199( is valid.)2 362(network/protocol in common with the destination for which the requested service)10 3361 4 720 4082 t (assume the system)2 840 1 720 4202 t 10 I f (research.att.com)1633 4202 w 10 R f (has the Datakit address)3 1067 1 2377 4202 t 10 I f (nj/astro/research)3517 4202 w 10 R f (and IP addresses)2 761 1 4279 4202 t 10 I f (135.104.117.5)720 4322 w 10 R f (and)1320 4322 w 10 I f (129.11.4.1.)1489 4322 w 10 R f (The call)1 324 1 1989 4322 t 9 CW f (fd = dial\("net!research.att.com!login", 0, 0, 0, 0\);)6 2808 1 1008 4492 t 10 R f (tries in succession to connect to)5 1338 1 720 4672 t 10 I f (nj/astro/research!login)2097 4672 w 10 R f (on the Datakit and both)4 994 1 3064 4672 t 10 I f (135.104.117.5!513)4098 4672 w 10 R f (and)4896 4672 w 10 I f (129.11.4.1!513)720 4792 w 10 R f (across the Internet.)2 756 1 1353 4792 t 10 I f (Dial)970 4948 w 10 R f ( example, the destinations)3 1287( For)1 272( of symbolic names.)3 1054(accepts addresses instead)2 1172 4 1255 4948 t 10 I f (tcp!135.104.117.5!513)720 5068 w 10 R f (and)1658 5068 w 10 I f (tcp!research.att.com!login)1827 5068 w 10 R f (are equivalent references to the same machine.)6 1863 1 2917 5068 t 10 B f (5.2. Listening)1 601 1 720 5308 t 10 R f ( first)1 192( It)1 117(A program uses four routines to listen for incoming connections.)9 2640 3 970 5464 t 10 I f (announce)3950 5464 w 10 R f ( intention)1 388(\(2\)'s its)1 314 2 4338 5464 t (to receive connections, then)3 1174 1 720 5584 t 10 I f (listen)1939 5584 w 10 R f ( calls and finally)3 720(\(2\)'s for)1 349 2 2156 5584 t 10 I f (accept)3269 5584 w 10 R f (\(2\)'s or)1 315 1 3529 5584 t 10 I f (reject)3888 5584 w 10 R f (\(2\)'s them.)1 457 1 4115 5584 t 10 I f (Announce)4641 5584 w 10 R f (returns an open file descriptor for the)6 1539 1 720 5704 t 10 CW f (ctl)2293 5704 w 10 R f (file of a connection and fills)5 1168 1 2507 5704 t 10 I f (dir)3709 5704 w 10 R f (with the path of the protocol)5 1180 1 3860 5704 t (directory for the announcement.)3 1280 1 720 5824 t 9 CW f ( *addr, char *dir\))3 972(int announce\(char)1 972 2 1008 5994 t 10 I f (Addr)720 6174 w 10 R f ( contain a service, the announcement is for all)8 1872(is the symbolic name/address announced; if it does not)8 2219 2 949 6174 t ( one can easily write the equivalent of the)8 1663( Thus,)1 276(services not explicitly announced.)3 1362 3 720 6294 t 10 CW f (inetd)4046 6294 w 10 R f (program without)1 669 1 4371 6294 t ( announcement remains in force until the control file is)9 2365( An)1 191( separate service.)2 721(having to announce each)3 1043 4 720 6414 t (closed.)720 6534 w 10 I f (Listen)720 6690 w 10 R f (returns an open file descriptor for the)6 1527 1 997 6690 t 10 CW f (ctl)2556 6690 w 10 R f (file and fills)2 497 1 2768 6690 t 10 I f (ldir)3297 6690 w 10 R f ( of the protocol directory)4 1030(with the path)2 536 2 3474 6690 t ( is passed)2 383( It)1 111(for the received connection.)3 1113 3 720 6810 t 10 I f (dir)2352 6810 w 10 R f (from the announcement.)2 973 1 2494 6810 t 9 CW f ( *dir, char *ldir\))3 972(int listen\(char)1 864 2 1008 6980 t 10 I f (Accept)720 7196 w 10 R f (and)1016 7196 w 10 I f (reject)1185 7196 w 10 R f (are called with the control file descriptor and)7 1800 1 1437 7196 t 10 I f (ldir)3263 7196 w 10 R f (returned by)1 458 1 3434 7196 t 10 I f (listen.)3918 7196 w 10 R f (Some networks such)2 829 1 4211 7196 t (as Datakit accept a reason for a rejection; networks such as IP ignore the third argument.)15 3536 1 720 7316 t cleartomark showpage saveobj restore %%EndPage: 9 9 %%Page: 10 10 /saveobj save def mark 10 pagesetup 10 R f (- 10 -)2 216 1 2772 480 t 9 CW f ( ctl, char *ldir\))3 918(int accept\(int)1 810 2 1008 830 t ( ctl, char *ldir, char *reason\))5 1674(int reject\(int)1 810 2 1008 940 t 10 R f ( listens for connections)3 960( announces itself,)2 718( It)1 122(The following code implements a typical TCP listener.)7 2270 4 970 1156 t ( new process echoes data on the connection until the remote end)11 2696( The)1 217( for each.)2 397(and forks a new process)4 1010 4 720 1276 t ( for any addresses bound to the)6 1290( "*" in the symbolic name means the announcement is valid)10 2461( The)1 212(closes it.)1 357 4 720 1396 t (machine the program is run on.)5 1248 1 720 1516 t 9 CW f (int)1008 1686 w (echo_server\(void\))1008 1796 w ({)1008 1906 w (int dfd, lcfd;)2 756 1 1440 2016 t (char adir[40], ldir[40];)2 1296 1 1440 2126 t (int n;)1 324 1 1440 2236 t (char buf[256];)1 756 1 1440 2346 t (afd = announce\("tcp!*!echo", adir\);)3 1890 1 1440 2566 t (if\(afd < 0\))2 594 1 1440 2676 t (return -1;)1 540 1 1872 2786 t (for\(;;\){)1440 3006 w (/* listen for a call */)5 1242 1 1872 3116 t (lcfd = listen\(adir, ldir\);)3 1404 1 1872 3226 t (if\(lcfd < 0\))2 648 1 1872 3336 t (return -1;)1 540 1 2304 3446 t (/* fork a process to echo */)6 1512 1 1872 3666 t (switch\(fork\(\)\){)1872 3776 w (case 0:)1 378 1 1872 3886 t (/* accept the call and open the data file */)9 2376 1 2304 3996 t (dfd = accept\(lcfd, ldir\);)3 1350 1 2304 4106 t (if\(dfd < 0\))2 594 1 2304 4216 t (return -1;)1 540 1 2736 4326 t (/* echo until EOF */)4 1080 1 2304 4546 t (while\(\(n = read\(dfd, buf, sizeof\(buf\)\)\) > 0\))6 2376 1 2304 4656 t (write\(dfd, buf, n\);)2 1026 1 2736 4766 t (exits\(0\);)2304 4876 w (case -1:)1 432 1 1872 4986 t (perror\("forking"\);)2304 5096 w (default:)1872 5206 w (close\(lcfd\);)2304 5316 w (break;)2304 5426 w (})1872 5536 w (})1440 5756 w (})1008 5866 w 10 B f ( Level)1 258(6. User)1 324 2 720 6166 t 10 R f ( almost exclusively in terms of 9P messages. Only)8 2053(Communication between Plan 9 machines is done)6 2017 2 970 6322 t (two services)1 506 1 720 6442 t 10 I f (cpu)1261 6442 w 10 R f (and)1440 6442 w 10 I f (exportfs)1619 6442 w 10 R f ( The)1 214(are used.)1 364 2 1976 6442 t 10 I f (cpu)2588 6442 w 10 R f (service is analogous to)3 934 1 2766 6442 t 10 CW f (rlogin)3734 6442 w 10 R f ( rather than)2 472(. However,)1 474 2 4094 6442 t (emulating a terminal session across the network,)6 2059 1 720 6562 t 10 I f (cpu)2824 6562 w 10 R f ( whose)1 301(creates a process on the remote machine)6 1726 2 3013 6562 t ( in which it was invoked.)5 1010(namespace is an analogue of the window)6 1647 2 720 6682 t 10 I f (Exportfs)3428 6682 w 10 R f (is a user level file server which)6 1247 1 3793 6682 t ( machine to machine across a network. It is used by the)11 2306(allows a piece of namespace to be exported from)8 2014 2 720 6802 t 10 I f (cpu)720 6922 w 10 R f (command to serve the files in the terminal's namespace when they are accessed from the cpu server.)16 4003 1 889 6922 t ( device driver file systems are mounted in a directory called)10 2479(By convention the protocol and)4 1292 2 970 7078 t 10 CW f (/net)4775 7078 w 10 R f (.)5015 7078 w ( per-process namespace allows users to configure an arbitrary view of the system, in practice)14 3788(Although the)1 532 2 720 7198 t (most user profiles build a conventional namespace.)6 2044 1 720 7318 t cleartomark showpage saveobj restore %%EndPage: 10 10 %%Page: 11 11 /saveobj save def mark 11 pagesetup 10 R f (- 11 -)2 216 1 2772 480 t 10 B f (6.1. Exportfs)1 572 1 720 840 t 10 I f (Exportfs)970 996 w 10 R f ( The)1 207( call.)1 196(is invoked by an incoming network)5 1418 3 1335 996 t 10 CW f (listener)3183 996 w 10 R f (\(the Plan 9 equivalent of)4 990 1 3690 996 t 10 CW f (inetd)4707 996 w 10 R f (\))5007 996 w ( before starting)2 616(runs the profile of the user requesting the service to construct a namespace)12 3060 2 720 1116 t 10 I f (exportfs)4427 1116 w 10 R f (. After)1 291 1 4749 1116 t ( remote process mounts the connec-)5 1438(an initial protocol establishes the root of the file tree being exported, the)12 2882 2 720 1236 t (tion allowing)1 538 1 720 1356 t 10 I f (exportfs)1290 1356 w 10 R f ( as a relay file server. Operations in the imported file tree are executed on the)15 3170(to act)1 226 2 1644 1356 t ( a result the namespace of the remote machine appears to be)11 2550( As)1 175( returned.)1 396(remote server and the results)4 1199 4 720 1476 t (exported into a local file tree.)5 1175 1 720 1596 t (The)970 1752 w 10 I f (import)1158 1752 w 10 R f (command calls)1 610 1 1458 1752 t 10 I f (exportfs)2101 1752 w 10 R f (on a remote machine, mounts the result in the local namespace)10 2584 1 2456 1752 t ( the mount)2 446( process is required locally to serve mounts; 9P messages are generated by)12 3092( No)1 182(and then exits.)2 600 4 720 1872 t (driver in the kernel and sent directly over the network.)9 2173 1 720 1992 t 10 I f (Exportfs)970 2148 w 10 R f ( the system calls)3 676(must be multithreaded since)3 1139 2 1339 2148 t 10 I f (open, read)1 433 1 3185 2148 t 10 R f (and)3649 2148 w 10 I f (write)3824 2148 w 10 R f ( 9 does)2 295( Plan)1 234(may block.)1 450 3 4061 2148 t (not implement the)2 742 1 720 2268 t 10 I f (select)1494 2268 w 10 R f (system call but does allow processes to share file descriptors, memory and other)12 3287 1 1753 2268 t (resources.)720 2388 w 10 I f (Exportfs)1198 2388 w 10 R f ( provide a powerful means of sharing resources)7 2088(and the configurable namespace)3 1363 2 1589 2388 t ( many)1 277( is a building block for constructing complex namespaces served from)10 3111( It)1 142(between machines.)1 790 4 720 2508 t (machines.)720 2628 w ( encourages naive users to exploit the potential of a richly connected)11 2802(The simplicity of the interfaces)4 1268 2 970 2784 t ( example on a terminal with)5 1158( For)1 197( between networks.)2 789( these tools it is easy to gateway)7 1348(environment. Using)1 828 5 720 2904 t (only a Datakit connection:)3 1057 1 720 3024 t 9 CW f (import -a helix /net)3 1080 1 1008 3194 t (telnet ai.mit.edu)1 918 1 1008 3304 t 10 R f (The)720 3484 w 10 I f (import)905 3484 w 10 R f ( instance)1 358(command makes a Datakit connection to the machine helix where it starts an)12 3127 2 1202 3484 t 10 I f (exportfs)4718 3484 w 10 R f (to serve)1 315 1 720 3604 t 10 CW f (/net)1062 3604 w 10 R f (. The)1 232 1 1302 3604 t 10 I f (import)1561 3604 w 10 R f (command mounts the remote)3 1169 1 1855 3604 t 10 CW f (/net)3051 3604 w 10 R f (directory after \(the)2 751 1 3318 3604 t 10 I f (-a)4096 3604 w 10 R f (option to)1 360 1 4206 3604 t 10 I f (import)4592 3604 w 10 R f (\) the)1 181 1 4859 3604 t (existing contents of the local)4 1149 1 720 3724 t 10 CW f (/net)1894 3724 w 10 R f ( con-)1 203( directory contains the union of the local and remote)9 2088(directory. The)1 590 3 2159 3724 t (tents of)1 298 1 720 3844 t 10 CW f (/net)1044 3844 w 10 R f ( ones of the same name so networks on the local machine are)12 2439( entries supersede remote)3 1014(. Local)1 303 3 1284 3844 t ( the remote directory are now)5 1207( unique entries in)3 706( However,)1 445(chosen in preference to those supplied remotely.)6 1962 4 720 3964 t (visible in the local)3 754 1 720 4084 t 10 CW f (/net)1505 4084 w 10 R f ( Datakit are available)3 865( networks helix supports over and above the)7 1803(directory. The)1 596 3 1776 4084 t (to the terminal. The effect on the namespace is shown by the following example:)13 3228 1 720 4204 t 9 CW f (philw-gnot% ls /net)2 1026 1 1008 4374 t (/net/cs)1008 4484 w (/net/dk)1008 4594 w (philw-gnot% import -a musca /net)4 1728 1 1008 4704 t (philw-gnot% ls /net)2 1026 1 1008 4814 t (/net/cs)1008 4924 w (/net/cs)1008 5034 w (/net/dk)1008 5144 w (/net/dk)1008 5254 w (/net/dns)1008 5364 w (/net/ether)1008 5474 w (/net/il)1008 5584 w (/net/tcp)1008 5694 w (/net/udp)1008 5804 w 10 B f (6.2. Ftpfs)1 422 1 720 6104 t 10 R f ( decided to make)3 697(Fed up with the user unfriendly interface of the ftp command on other systems, we)14 3373 2 970 6260 t ( command,)1 446( Our)1 207(our ftp interface a file system.)5 1207 3 720 6380 t 10 I f (ftpfs,)2607 6380 w 10 R f ( for login)2 374(dials the ftp port of a remote system, prompts)8 1834 2 2832 6380 t (and password, sets image mode, and mounts the remote file system onto)11 2889 1 720 6500 t 10 CW f (/n/ftp.)3635 6500 w 10 R f (Files and directories are)3 959 1 4081 6500 t ( works with TOPS-20,)3 945( Ftpfs)1 271( is updated whenever a file is created.)7 1606( cache)1 267( The)1 221(cached to reduce traffic.)3 1010 6 720 6620 t (VMS, and various Unix flavors as the remote system.)8 2142 1 720 6740 t cleartomark showpage saveobj restore %%EndPage: 11 11 %%Page: 12 12 /saveobj save def mark 12 pagesetup 10 R f (- 12 -)2 216 1 2772 480 t 10 B f ( Fiber Links)2 529(7. Cyclone)1 469 2 720 840 t 10 R f ( link con-)2 393( A)1 127( are connected by high-bandwidth point-to-point links.)6 2214(The file servers and CPU servers)5 1336 4 970 996 t ( VME cards use 33Mhz Intel 960 proces-)7 1663( The)1 207( by a pair of optical fibers.)6 1068(sists of two VME cards connected)5 1382 4 720 1116 t ( the VME)2 404( in)1 107( Software)1 414(sors and AMD's TAXI fiber transmitter/receivers to drive the lines at 125 Mbit/sec.)12 3395 4 720 1236 t (card reduces latency by copying messages from system memory to fiber without intermediate buffering.)13 4159 1 720 1356 t 10 B f (8. Performance)1 678 1 720 1596 t 10 R f ( between two processes for)4 1088(We've measured both latency and throughput of reading and writing bytes)10 2982 2 970 1752 t ( were made on two and four CPU SGI Power Series processors.)11 2567( Measurements)1 634(a number of different paths.)4 1119 3 720 1872 t ( for a byte sent from)5 832( latency is measured as the round trip time)8 1716( The)1 208(The CPU's are 25 MHZ MIPS 3000's.)6 1564 4 720 1992 t ( to)1 118( is measured using 16k writes from one process)8 2025( Throughput)1 538(one process to another and back again.)6 1639 4 720 2112 t (another.)720 2232 w 10 S f (_ _________________________________)1 1684 1 2038 2372 t 10 R f (Table 1 - Performance)3 894 1 2458 2492 t 10 S f (_ _________________________________)1 1684 1 2038 2512 t 10 R f ( latency)1 469(test throughput)1 922 2 2291 2632 t (MBytes/sec millisec)1 939 1 2758 2752 t 10 S f (_ _________________________________)1 1684 1 2038 2772 t 10 R f ( .255)1 570(pipes 8.15)1 968 2 2113 2892 t 10 S f (_ _________________________________)1 1684 1 2038 2912 t 10 R f ( 1.42)1 520(IL/ether 1.02)1 968 2 2113 3032 t 10 S f (_ _________________________________)1 1684 1 2038 3052 t 10 R f ( 1.75)1 520(URP/datakit 0.22)1 968 2 2113 3172 t 10 S f (_ _________________________________)1 1684 1 2038 3192 t 10 R f ( 0.375)1 620(Cyclone 3.2)1 918 2 2113 3312 t 10 S f ( \347)1 -1684(_ _________________________________)1 1684 2 2038 3332 t (\347)2038 3272 w (\347)2038 3172 w (\347)2038 3072 w (\347)2038 2972 w (\347)2038 2872 w (\347)2038 2772 w (\347)2038 2672 w (\347)2038 2572 w (\347)2038 2472 w (\347)2658 3332 w (\347)2658 3312 w (\347)2658 3212 w (\347)2658 3112 w (\347)2658 3012 w (\347)2658 2912 w (\347)2658 2812 w (\347)2658 2712 w (\347)2658 2612 w (\347)3280 3332 w (\347)3280 3312 w (\347)3280 3212 w (\347)3280 3112 w (\347)3280 3012 w (\347)3280 2912 w (\347)3280 2812 w (\347)3280 2712 w (\347)3280 2612 w (\347)3722 3332 w (\347)3722 3272 w (\347)3722 3172 w (\347)3722 3072 w (\347)3722 2972 w (\347)3722 2872 w (\347)3722 2772 w (\347)3722 2672 w (\347)3722 2572 w (\347)3722 2472 w 10 B f (9. Conclusion)1 604 1 720 3692 t 10 R f ( as file systems coupled with an ASCII interface has proved more)11 2675(The representation of all resources)4 1395 2 970 3848 t ( by any computer in our networks inde-)7 1613( can be used)3 508( Resources)1 466(powerful than we had originally imagined.)5 1733 4 720 3968 t ( connection server provides an elegant means of decoupling)8 2493( The)1 218( or CPU type.)3 589(pendent of byte ordering)3 1020 4 720 4088 t ( successfully use Plan 9 without knowing the topology of the sys-)11 2679( Users)1 282( networks they use.)3 786(tools from the)2 573 4 720 4208 t ( information about 9P can be found in the Plan 9 Programmers manual)12 2861( More)1 269( the networks they use.)4 930(tem or)1 260 4 720 4328 t (available by anonymous ftp from research.att.com in the directory dist/pla9doc.)9 3178 1 720 4448 t 10 B f (10. References)1 639 1 720 4688 t 10 R f ( 9 from Bell Labs'',)4 824([Pike90] R. Pike, D. Presotto, K. Thompson, H. Trickey, ``Plan)9 2594 2 720 4844 t 10 I f (UKUUG Proc. of the)3 870 1 4170 4844 t (Summer 1990 Conf. , London, England, 1990)6 1817 1 720 4964 t 10 R f ([Needham] R. Needham, ``Names'', in)4 1559 1 720 5120 t 10 I f (Distributed systems,)1 811 1 2304 5120 t 10 R f (S. Mullender, ed., Addison Wesley, 1989)5 1654 1 3140 5120 t ([Presotto] D. Presotto, ``Multiprocessor Streams for Plan 9'',)7 2503 1 720 5276 t 10 I f (UKUUG Proc. of the Summer 1990 Conf. ,)7 1784 1 3256 5276 t 10 R f (London, England, 1990)2 944 1 720 5396 t ( Crane, E. Taf and J. Hupp, ``The Ethernet Local Network: Three)11 2832([Met80] R. Metcalfe, D. Boggs, C.)5 1488 2 720 5552 t (reports'',)720 5672 w 10 I f (CSL-80-2,)1113 5672 w 10 R f (XEROX Palo Alto Research Center, February 1980.)6 2091 1 1552 5672 t ( Traffic'',)1 400([Fra80] A. G. Fraser, ``Datakit - A Modular Network for Synchronous and Asynchronous)12 3668 2 720 5828 t 10 I f (Proc.)4821 5828 w (International Conference on Communication , Boston Mass., June 1980.)8 2904 1 720 5948 t 10 R f ( Evaluating new Design Techniques'',)4 1673([Pet89a] L. Peterson, ``RPC in the X-Kernel:)6 2007 2 720 6104 t 10 I f (Proc. Twelfth)1 580 1 4460 6104 t (Symposium on Operating Systems Principles,)4 1818 1 720 6224 t 10 R f (Litchfield Park AZ, December 1990.)4 1469 1 2563 6224 t ([Rit84a] D. M. Ritchie, ``A Stream Input-Output System'',)7 2460 1 720 6380 t 10 I f (AT&T Bell Laboratories Technical Journal,)4 1821 1 3219 6380 t (68\(8\),)720 6500 w 10 R f (October 1984.)1 571 1 986 6500 t cleartomark showpage saveobj restore %%EndPage: 12 12 %%Trailer done %%Pages: 12 %%DocumentFonts: Courier Times-Bold Times-Italic Times-Roman Symbol