28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ceptionInterfaceMismatch,whichcanberaisedbythecreatestatement. InterfaceMismatchisoneofthefewtypecheckingerrorsthatcannotbe detectedatcompile-time,butonlyatrun-time.Forexample,thesecond createstatementinstantiatesachildprocess,<strong>and</strong>returnsanoutputport boundtotheinitializationport.Itisknownstatically(thatis,atcompile time)thatthetypeofthisoutputportmustbecompatiblewiththeoutput 1.Introductionto<strong>Hermes</strong>17<br />

exceptionwillberaised. anarbitraryprogram.Ifthisprogramdoesn'thavetheproper3-pluginterface(as,forexample,Filterdoesnot),thentheInterfaceMismatch<br />

portClient.Butitisnotknownstaticallywhethertheinitializationinput portoftheprogramisofamatchingtype,sinceGetProgrammayreturn<br />

akernelhackerorasuperusertowriteaccesscontrolpolicies.Youcannot Anytypeofcallcanbereboundprovideditistoaserviceofmatchingtype. ThinkoftheexibilityofUNIXpipesextendedtoanykindofcalls. tionofports.Thetechniqueisveryexible.ProgramslikeCompoundcan containarbitrarypoliciesforbindingtheportsoftheprogramsitcreates, therebycontrollingtheiraccesstootherprocesses.Youdon'tneedtobe systemsprogrammingondynamicprocesscreation<strong>and</strong>dynamicconnec-<br />

Becausemodulesaren'thard-wiredtospecicservices,theycanbereused.<br />

accidentallyorintentionallycircumventsomeoneelse'saccesscontrol.You cannotaccessanotheruser'sglobalvariables,sincetherearenoglobalvariables.Youcannotaccessaservicebyguessingitsname,orbyusingsome<br />

Althoughthisexampleisverysimple,itillustratestheeleganceofbasing<br />

undenedvalueasaname.YoucanonlygetabindingtoaninputportP if(1)youownPyourself<strong>and</strong>connecttoit,(2)Pistheinitializationport primitivesintothelanguage.Type-checkingguaranteesthatyoucan'tcopy aninteger,string,orotherinappropriatedatatypeintoacapability(output ofaprocessyoucreate,or(3)someoneelsegivesyouabindingtoP. port)variable.Typestate-checkingguaranteesthatyoucan'tuseanuninitialized<strong>and</strong>possiblygarbagevalueofacapability.Butyoumaycreate<br />

oldideainoperatingsystems.Itisnotwidespread,becauseitspremise| thatcapabilities(accessrights)areeasytostore<strong>and</strong>passaround,but impossibletoforge|isoftendicult<strong>and</strong>expensivetoimplement.Her-<br />

Thisapproachtosystemcongurationiscalledcapability-based.Itisan messolvesthisprobleminexpensivelybyintegratingtheoperatingsystems<br />

processes,<strong>and</strong>settingupportconnectionsbetweenprocesses.Youhave learnedthat<strong>Hermes</strong>isacapability-basedoperatingsystemencapsulated aserveristypicallydividedintoaninitializationpartwhichimports<strong>and</strong> Youhavelearnedhowtoimplementthebasicfunctionsofashell|creating aprogramwhichwasbothaclient<strong>and</strong>aserver.Youhavelearnedthat exportsports,<strong>and</strong>aserviceloopwhichh<strong>and</strong>lesrequestsfromitsclients. sagesasmuchasyouplease. capabilitieswithconnect,<strong>and</strong>copythemorpassthemaroundinmes-<br />

withinaprogramminglanguage.Youhavelearnedthefollowing<strong>Hermes</strong> Summary:WehavestudiedtheprogramFilter|ourrstexampleof

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!