plan9-review-1plan 921128013725-phpapp02

Embed Size (px)

Citation preview

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    1/57

    Plan 9: Not (Only) A Better UNIX

    Jim Huang( )

    e!elo"er# 0xlab http://0xlab.org/

    $ay % '0%' JuluOe!

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    2/57

    Rights to copy

    Attribution ShareAlike 3.0

    You are free

    to *o"y# +i,tribute# +i,"lay# an+ "er-orm te /or to mae +eri!ati!e /or, to mae *ommer*ial u,e o- te /or

    Under the following onditions

    Attribution. 1ou mu,t gi!e te original autor *re+it.

    Share Alike. I- you alter# tran,-orm# or buil+ u"on ti, /or# you may +i,tribute te

    re,ulting /or only un+er a li*en,e i+enti*al to ti, one.

    2or any reu,e or +i,tribution# you mu,t mae *lear to oter, te li*en,e term, o- ti,/or.

    Any o- te,e *on+ition, *an be /ai!e+ i- you get "ermi,,ion -rom te *o"yrigt ol+er.

    Your fair use and other rights are in no wa! affeted b! the above.

    3i*en,e text4tt"4*reati!e*ommon,.orgli*en,e,by5,a6.0legal*o+e

    7o"yrigt '0%' 0"lab

    tt"40xlab.org

    *onta*[email protected]

    7orre*tion,# ,ugge,tion,# *ontribution, an+

    tran,lation, are /el*ome8

    3ate,t u"+ate4 $ay % '0%'

    http://creativecommons.org/licenses/by-sa/3.0/legalcodehttp://creativecommons.org/licenses/by-sa/3.0/legalcode
  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    3/57

    Beyond this presentation

    http://sync.in/16W2nkk2vZ Design our own world-dominating !.

    i,*u,, 9lan :# an O tat many "eo"le tougt,oul+ a!e +ominate+ te /orl+.

    $eeting o- O"en our*e U,er, in ;ainan (&%:)http://mosut.org/

    7O7U9 '0%'" Oe! rou"

    " 7all -or 9arti*i"ation8

    N7=U 3e*ture (e" '0%')" 3earn ,y,tem "rogramming -or A$ 7ortex5$

    " ;O# tool*ain# ,y,tem mo+eling

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    4/57

    History always inspires us

    is not a new word." #louds$

    7lou+, i, a*tually ' ,e"arate o"erating ,y,tem,

    " 7lou+, ?%# ba,e+ on ?AX ernel (%:)

    " 7lou+, ?'# ba,e+ on a ernel (%::)

    9ur"o,e4 u""ort +i,tribute+ re,ear* at eorgiaIn,titute o- ;e*nology

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    5/57

    Clouds Ba,e+ on te obCe*ttrea+ "ara+igm

    At O le!el tere i, only one ty"e o- obCe*t D clouds

    a ernel im"lement, "er,i,tent !irtual memory" ;rea+, tra!el troug obCe*t,

    " Entry "oint,

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    6/57

    *BSD

    Linux

    !"#

    from clkao

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    7/57

    In memory of the heros

    Dennis %. &itchie 'dmr( 1)*1-2+11," 0 lan )

    " &elated talk: lan ) %ay 13 2+12

    Jo*en 3ie+te (%:&65'00%)

    " 3F mi*roernel" elate+ tal4 3F $i*roernel# 2eb G# '0%'

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    8/57

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    9/57

    Agenda #$% Design Concepts#&% 'ssential (lan )

    #% Renaissance

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    10/57

    Design Concepts

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    11/57

    +nix ,rigins #-.$)/)%

    Bell 3ab, a, a long i,tory in early o"erating ,y,tem,# -orexam"le BE51 -or IB$ G0:x ma*ine, $ulti*,

    =en ;om",on /ante+ to /rite a *om"uter o"erating ,y,temby te %:0,4" Ex"lore ,tru*ture, -or buil+ing O

    " Buil+ ,ometing -or our o/n grou" to u,e

    2un+amental i+ea4 a goo+ /ay to re"re,ent +ata (+i, -ile,)

    2ir,t ,te", -or Unix4" -in+ *on*rete re"re,entation -or +ata on +i,

    " +e-ine a**e,, meto+, to +ata

    Earlie,t Unix ,im"ly trie+ to buil+ ,ome ,u"er,tru*ture to te,t;om",on, i+ea,

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    12/57

    'arly Ideas a0out +nix #$)/).$)1&%

    %uch was inherited especially 4rom %ultics pro5ect

    2ile, *ontain Cu,t a ,euen*e o- byte,4" inter"retation i, u" to a""li*ation,

    " o"timiMation o- a**e,, i, u" to o"erating ,y,tem

    " "re-eren*e i, -or -ile, /it rea+able text# not binary

    2ile, are name+ in a ierar*i*al# tree5lie name,"a*e# e.g.

    /usr/dmr/japan/japanslides.ppt

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    13/57

    2ile System access operations

    asic operations are very simple:" handle = open(filename, read-or-write-mode)

    " handle = create (filename, protection-mode)

    " read(handle, buffer, nbtes)

    "write(handle, buffer, nbtes)

    " close(handle)

    " see!(handle, place)

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    14/57

    Hierarchical 3ames

    /

    -- source

    -- shell

    sh".c

    sh#.c

    #

    -- usr

    -- !en

    #

    -- dmr

    -- japan

    japanslides.ppt

    # #

    -- bin

    $h

    #

    -- ...

    3 f h h

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    15/57

    3ames for other things

    ni7 introduced a consistent a8straction: names 4or/ devices as part o4 the same hierarchy 4or e7ample" /de%/tt#& (name of terminal 23)

    " $de%/dis!/dis!0& (name of a whole disk)

    " /de%/mem (name for main memory)

    ;e,e really exi,t in te -ile ,y,tem an+ te ,ame"rote*tion an+ o/ner,i" "ro"ertie, are a""lie+ a,/it or+inary -ile,

    ;o te extent "o,,ible# tey loo lie te ,ame byte

    ,tream, a, "lain +i, -ile, ome (lie terminal, an+ net/or,) a!e ,ome

    ,"e*ial o"eration, tat a""ly4 KIO *ontrol,L

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    16/57

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    17/57

    3 (l ) #$))5 &55%

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    18/57

    3ext step4 (lan ) #$))5.&55%

    Designed in mid 9+Bs 8y many o4 the creators o4 0'&o8 ike Cen

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    19/57

    lan ) 4rom ell >a8s 8ased on lan ) 4rom uter !pace.

    or,t mo!ie e!er ma+e

    (by E+ oo+)

    (l ) f B ll l 0

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    20/57

    (lan ) from Bell la0s

    Designed in mid 9+Bs 8y many o4 the creators o4 0'&o8 ike Cen

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    21/57

    ersonal Workstation !ystems

    #entralied

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    22/57

    (lan ) Design (rinciples

    E!eryting i, a -ileL" tan+ar+ naming system-or all re,our*e,4 "atname,

    Kemote a**e,,L i, te *ommon *a,e" tan+ar+ resource access protocol!K:9L (K:9'000L)

    " U,e+ to a**e,, any -ile5lie ting# remote or lo*al

    9er,onal name,"a*e," Naming conventionsee" it ,ane

    A "ra*ti*al i,,ue4 O"en our*e" Unix ,our*e not a!ailable at KBell 3ab,L# it, birt"la*e8

    (lan ) !ssumptions

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    23/57

    (lan ) !ssumptions

    eliable ma*ine5room file servers are+5memory multi"ro*e,,or !le %&PU' servers

    " 3o*ate+ near -ile ,er!er, -or -a,t a**e,,

    emote5a**e,, /or,tation ter(inals

    " A**e,, your viewo- te en!ironment

    " onSt ontainyour en!ironment

    " i, i, o"tional

    A ;y"i*ally u,e+ -or -a,ter booting# -ile *a*e" Koot +ire*toryL i, lo*ate+ on your "rimary -ile

    ,er!er

    '"erything is a 2ile really

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    24/57

    '"erything is a 2ile really

    n many early operating systems di44erent types o48lock devices had di44erent ;Bs.

    One maCor inno!ation in UNIX /a, te ,ingle -ile IOA9I -or multi"le +e!i*e,.

    9lan : treat, !irtually all +e!i*e, an+ ,er!i*e, a, -ile5ba,e+ ,er!i*e,4" telnet

    " -t"

    " n-,

    3ota0le architecture

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    25/57

    3ota0le architecture

    ;ll system inter4aces through 4ile system. 'pre->inu7,

    or,tation 5 in+e"en+ent /oring en!ironment" aggregate+ re,our*e,# remote an+ lo*al.

    /proc

    " All "ro*e,,e, are !i,ible a, -ile, net

    " All net/or tra--i* rea+/ritten troug -ile ,y,tem

    7an im"ort 9OIX a"",# emulate Bereley ,o*etinter-a*e troug A9E (ANI9OIX En!ironment)

    'xample4 ,pen a socket

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    26/57

    'xample4 ,pen a socket

    % cat /net/tcp/clone/ctl

    44

    % cd /net/tcp/''

    % echo connect "#.#."'.0*+ ctl

    % echo ping data

    % cat datapong

    3amespace

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    27/57

    27

    ;ny 4ile resource can 8e ?mounted@ in a customia8ledirectory hierarchy or namespace:

    e!eral +ire*torie, *an be mounte+ at te ,ame "ointD re"la*e, te nee+ -or a T9A;Hbind /home/shilad/bin /bin

    bind /i386/bin /bin

    7o"ying a lo*al -ile footo a remote -lo""y4import lab.pc /a: /n/dos

    cp foo /n/dos/

    9i"ing te out"ut o- foo on host" to baron host2cpu -h host1 foo | cpu -h hos2 bar

    3amespace

    Communication (rotocol

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    28/57

    28

    ile-8ased ; supports 1F standard / 4ile operations

    Ke!i*e +ri!er,L (e.g. a telnet ,er!er) nee+ onlyim"lement te %G o"eration,.

    A mounting ,er!i*e tran,"arently tran,mit, lo*al -ile*omman+, to remote ,y,tem, u,ing te :9 "roto*ol.

    Communication (rotocol

    Synchroni7ation

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    29/57

    Synchroni7ation

    rendezvous system call:

    ;rea+ % ;rea+ '

    rendevous("foo",value1) rendezvous("foo",value2)

    8oth calls 8lockuntil they receive

    the ?4oo@ tagvalue2 value1

    Security

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    30/57

    Security

    o superuser

    An autenti*ation ,er!er maintain, a +ataba,e o-autenti*ation ey, -or all u,er,

    Bot *lient an+ ,er!er ex*ange en*ry"tion

    *allenge, an+ re,"on,e, ,o ea* ,i+e i, *on!in*e+o- te oter, i+entity.

    All :9 net/or *ommuni*ation, are ,e*ure

    (lan ) 2ailure

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    31/57

    (lan ) 2ailure

    n 1))9 >ucent pulled developers o44 o4 lan ) to4ocus on related Inferno!.

    Neiter 9lan : nor In-erno /ere *ommer*ially,u**e,,-ul.

    $o,t ex"ert, agree tat 9lan : /a, te*ni*ally,u"erior to UNIX but

    $o,t ex"ert, agree tat 9lan : /a, not ,u"eriorenoughto *on!ert u,er, o- UNIX

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    32/57

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    33/57

    'ssential (lan )

    Definitions

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    34/57

    Definitions )*

    " ;e 9lan : /in+o/ ,y,tem# /i* "ro!i+e, textual IO an+ bitma" gra"i* ,er!i*e,

    to bot lo*al an+ remote *lient "rogram, by o--ering a multi"lexe+ -ile ,er!i*e toto,e *lient,. It ,er!e, tra+itional UNIX -ile, lie +e!tty a, /ell a, more unu,ualone, tat "ro!i+e a**e,, to te mou,e an+ te ra/ ,*reen. Bitma" gra"i*,o"eration, are "ro!i+e+ by ,er!ing a -ile *alle++e!bitblt tat inter"ret, *lientme,,age, to "er-orm ra,ter o"eration,.

    +

    " A *omman+ inter"reter -or 9lan : tat "ro!i+e, ,imilar -a*ilitie, to UNIX, Bourne,ell# /it ,ome ,mall a++ition, an+ le,, i+io,yn*rati* ,yntax.

    9P Protool" ;e 9lan : -ile ,y,tem "roto*ol. It i, ,tru*ture+ a, a ,et o- tran,a*tion, tat ,en+ a

    reue,t -rom a *lient to a (lo*al or remote) ,er!er an+ return te re,ult.

    ,- Protool" I3 i, a *u,tom im"lemente+ net/or "roto*ol to tran,"ort te remote "ro*e+ure *all

    me,,age, :9.

    2ile ser"ice architecture

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    35/57

    #lient computer !erver computer

    ;pplicationprogram

    ;pplicationprogram

    #lient module

    lat 4ile service

    Directory service

    Lookup

    AddNameUnName

    GetNames

    Read

    Write

    Create

    Delete

    GetAttributes

    SetAttributes

    2ile ser"ice architecture

    32S architecture

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    36/57

    #lient computer !erver computer

    04ile

    system

    !

    client

    !

    server

    04ile

    system

    ;pplicationprogram

    ;pplicationprogram

    Girtual 4ile systemGirtual 4ile system

    ther

    4ilesystem

    0 kernel

    system calls

    !protocol

    'remote operations,

    0

    perations

    on local 4iles

    perations

    on

    remote 4iles

    *

    ;pplicationprogram

    !#lient

    Cernel;pplication

    program

    !

    #lient

    #lient computer

    32S architecture

    32S ser"er operations #simplified%

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    37/57

    read(fh, offset, count) -> attr, datawrite(fh, offset, count, data) -> attr

    create(dirfh, name, attr) -> newfh, attr

    remove(dirfh, name) status

    getattr(fh) -> attr

    setattr(fh, attr) -> attr

    lookup(dirfh, name) -> fh, attrrename(dirfh, name, todirfh, toname)

    link(newdirfh, newname, dirfh, name)

    readdir(dirfh, cookie, count) -> entries

    symlink(newdirfh, newname, string) -> status

    readlink(fh) -> string

    mkdir(dirfh, name, attr) -> newfh, attr

    rmdir(dirfh, name) -> status

    statfs(fh) -> fsstats

    fh = file handle:

    ilesystem identi4ier i-node number i-node generation

    Model flat file serviceRead(FileId, i, n) -> Data

    Write(FileId, i, Data)

    Create() -> FileId

    Delete(FileId)

    GetAttributes(FileId) -> Attr

    SetAttributes(FileId, Attr)

    Model directory service

    Lookup(Dir, Name) -> FileId

    AddName(Dir, Name, File)

    UnName(Dir, Name)

    GetNames(Dir, Pattern)

    ->NameSeq

    p # p %

    32S ser"er operations #simplified%

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    38/57

    read(fh, offset, count) -> attr, datawrite(fh, offset, count, data) -> attr

    create(dirfh, name, attr) -> newfh, attr

    remove(dirfh, name) status

    getattr(fh) -> attr

    setattr(fh, attr) -> attr

    lookup(dirfh, name) -> fh, attrrename(dirfh, name, todirfh, toname)

    link(newdirfh, newname, dirfh, name)

    readdir(dirfh, cookie, count) -> entries

    symlink(newdirfh, newname, string) -> status

    readlink(fh) -> string

    mkdir(dirfh, name, attr) -> newfh, attrrmdir(dirfh, name) -> status

    statfs(fh) -> fsstats

    fh = file handle:

    Filesystem identifier i-node number i-node generation

    Model flat file service

    Read(FileId, i, n) -> Data

    Write(FileId, i, Data)

    Create() -> FileId

    Delete(FileId)

    GetAttributes(FileId) -> AttrSetAttributes(FileId, Attr)

    Model directory service

    Lookup(Dir, Name) -> FileId

    AddName(Dir, Name, File)UnName(Dir, Name)

    GetNames(Dir, Pattern)

    ->NameSeq

    p # p %

    32S access control and authentication

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    39/57

    !tateless server

    " the userHs identity and access rights must 8e checked 8ythe server on each reIuest.

    " In te lo*al -ile ,y,tem tey are *e*e+ only on open()

    E!ery *lient reue,t i, a**om"anie+ by te u,erI an+

    grou"I" in,erte+ by te 97 ,y,tem

    er!er i, ex"o,e+ to im"o,ter atta*, unle,, te u,erIan+ grou"I are "rote*te+ by en*ry"tion

    " =erbero, a, been integrate+ /it N2 to "ro!i+e a,tronger an+ more *om"reen,i!e ,e*urity ,olution

    Local and remote file systems

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    40/57

    yaccessi0le on an 32S client

    5im 5ane 5oeann

    usersstudents

    usrvmuni7

    #lient !erver 2

    . . . n4s

    &emote

    mountsta44

    8ig 8o85on

    people

    !erver 1

    e7port

    'root,

    &emote

    mount

    . . .

    7

    'root, 'root,

    Note: The file system mounted at/usr/studentsin the client is actually the sub-tree located at/export/peoplein Server 1;

    the file system mounted at/usr/staffin the client is actually the sub-tree located at/nfs/usersin Server 2.

    *

    (lan )4 Resource +nified to 2iles

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    41/57

    ;ll resources in lan ) look like 4ile systems.

    2ile Oriente+ a**e,," Hierar*i*al name tree

    " A**e,,ible by name

    " A**e,, *ontent, by rea+ an+ /rite *all,

    (lan ) Communications

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    42/57

    rovides diagnostic in4ormation on the current status o4 the connectionstatus

    rovides in4ormation on the other side o4 the connectionremote

    rovides in4ormation on the callerHs side o4 the connectionlocal

    sed to accept incoming connection setup reIuestslisten

    sed to read and write datadata

    sed to write protocol-speci4ic control commandsctlDescriptionFile

    2ile, a,,o*iate+ /it a ,ingle ;79 *onne*tion in 9lan :.

    2ile ser"er 8 3aming4 union directory

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    43/57

    )( (rotocol

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    44/57

    !tandard rotocol 4or accessing

    resources Bell lab, im"lemente+ I3 9roto*ol -or

    net/or tran,"ort o- :9 me,,age,

    Security

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    45/57

    2a*totum i, te *entral *om"onent o- te ,e*urity ar*ite*ture.

    2a*totum ,e*urely ol+, a *o"y o- te u,er, ey, an+negotiate, autenti*ation "roto*ol,# on beal- o- te u,er# /it,e*ure ,er!i*e, aroun+ te net/or" Ea* box i, a (ty"i*ally) ,e"arate ma*ine

    " Elli",e i, a "ro*e,,. #$are -a*totum "ro*e,,e,

    " %$are te "ie*e, an+ "roxie, o- a +i,tribute+ "rogram.

    ;e autenti*ation ,er!er i, one o- ,e!eralre"o,itorie, -or u,er, ,e*urity in-ormation tat-a*totum "ro*e,,e, *on,ult a, reuire+.e*,tore i, a ,are+ re,our*e -or ,toring "ri!atein-ormation ,u* a, ey, -a*totum *on,ult, it -or te

    u,er +uring boot,tra"

    Capa0ility for (arallel (rogramming

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    46/57

    Cernel provides a simple process model and a 4ew

    care4ully designed system calls 4or synchroniationand sharing.

    9arallel "rogramming language *alle+ Ale- ,u""ort,*on*urrent "rogramming.

    Altoug it i, "o,,ible to /rite "arallel "rogram, in 7#Ale- i, te "arallel language o- *oi*e.

    Ale- u,e, a ,y,tem *all *alle+ ren+eM!ou, to "ro!i+e,a /ay -or "ro*e,,e, to ,yn*roniMe.

    Structure

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    47/57

    %ain arts

    " 2ile ,er!er," 79U ,er!er,

    " ;erminal, (u,er a**e,, "oint,).

    ;y"i*ally *entrally lo*ate+ -ile

    ,er!er, an+ 79U ,er!er,

    # !erversile !ervers

    Eigh !peedetwork

    #entrally located multiprocessor machines with largememories and high 8andwidth point to point interconnects.

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    48/57

    J7ample: Jcho !erver

    $%&' ()*+ &,-.+,+/0' 1 02-&31.$(4 .&'0+/+56

    70 1//)8/3+' &0'+.9 .&'0+/' 9)5 3)//+30&)/': 1/* 9)5;'

    1 /+< -5)3+'' 9)5 +13%6$%+ /+< -5)3+'' +3%)+' *101 )/

    0%+ 3)//+30&)/ 8/0&. 0%+ 5+,)0++/* 3.)'+' &06

    $%+ =>= &/ 0%+ '2,?).&3 /1,+,+1/' 0%+ 1//)8/3+,+/0 &' @1.&*9)5 1/2 1**5+''+' ?)8/* 0) 0%+,13%&/+ 0%+ -5)A51, &' 58/ )/6

    +sing (lan )

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    49/57

    J7ample: Jcho !erver

    1.;nnounce',

    2.>isten',

    K.;ccept', LL &e5ect',

    *.rocess',M.

    3.#lose',M

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    50/57

    (lan )4 +sing (lan ) J7ample: Jcho !erver

    1. ;nnounce', &eturns open 4ile descriptor 4or the

    ctl 4ile o4 a connection and 4ills dirwith the path o4 the protocoldirectory 4or the announcement.

    int announce'char Naddr char Ndir,

    ;ddr is the sym8olic name/addressannounced( i4 it does not contain aservice the announcement is 4or allservices not e7plicitly announced.

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    51/57

    (lan )4 +sing (lan ) J7ample: Jcho !erver

    2. >isten', >isten returns an open 4ile

    descriptor 4or the ctl 4ile and 4ills ldirwith the path o4 the protocoldirectory 4or the receivedconnection.

    t is passed dir 4rom theannouncement.

    int listen'char Ndir char Nldir,

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    52/57

    (lan )4 +sing (lan ) J7ample: Jcho !erver

    K. ;ccept', and &e5ect', ;ccept and re5ect are called with

    the control 4ile descriptor and ldirreturned 8y listen.

    !ome networks such as Datakitaccept a reason 4or a re5ection(networks such as ignore thethird argument.

    int accept'int ctl char Nldir,

    int re5ect'int ctl char Nldir charNreason,

    +sing (lan )

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    53/57

    J7ample: Jcho !erver

    1.;nnounce',

    2.>isten',

    K.;ccept', LL &e5ect',

    *.rocess',M.

    3.#lose',M

    Significance

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    54/57

    ul4ills de4inition o4 Distri8uted !ystem

    :94 U,e, me,,age "a,,ing to *oor+inate a*tion,

    9ro!i+e, -or te maCor +e,ign *on,i+eration, a,outline+

    &eterogeneity, 'penness, Security, Scalability,#ailure handling, oncurrency, ransparency

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    55/57

    Renassance

    Reference

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    56/57

    ni7 and eyond: ;eme, in O"erating y,tem,

    e,ear*# enni, $. it*ie# Bell 3aboratorie,#Al*atel 3u*ent ('00G)

    9lan : -rom Bell 3ab,4 eal orl+ i,tribute+O"erating y,tem 7a,e tu+y# Bryan =inney#

    7om"uter *ien*e an+ Engineering# 7ri,to"erNe/"ort Uni!er,ity ('00&)

  • 8/9/2019 plan9-review-1plan 921128013725-phpapp02

    57/57

    tt"40xlab.org