/
Inferno: An Overview Inferno: An Overview

Inferno: An Overview - PDF document

pasty-toler
pasty-toler . @pasty-toler
Follow
415 views
Uploaded On 2015-08-15

Inferno: An Overview - PPT Presentation

inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENTIntroductionInferno is an operating system for creating andsupporting distributed services and other networkedapplicationsIt was originally ID: 107662

inferno OPERATING SYSTEM FOR NETWORK APPLICATION

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Inferno: An Overview" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENTIntroductionInferno is an operating system for creating andsupporting distributed services and other networkedapplications.It was originally developed by theComputing Science Research Centre of Bell Labs,the R&D arm of Lucent Technologies and has beensubstantially further developed by Vita Nuova andInferno encapsulates many years of Bell Labsresearch in operating systems,languages,on-the-flycompilers,graphics,security,networking andportability.It is intended to be used in a variety ofnetwork environments:home,office and mobile.Inferno's definitive strength lies in its portabilityand versatility across several dimensions:Portability across processors:it currently runs onIntel,SPARC,MIPS,PowerPC and ARM(includingThumb).Work is currently underway onPortability across environments:it runs as anative operating system on small devices,and alsoas a user application under Windows,Linux andUNIX.In all these environments Infernoapplications see an identical interface.Distributed design:the identical environment isestablished on each device,and each may importthe resources of the other platforms.Dynamic adaptability:applications may,dependingon the hardware or other resources available,loaddiferent program modules to perform a specificfunction,for example,a video player applicationmight use any of several different decoder modules.Portability Across ProcessorsThe Inferno kernel and device drivers are allwritten in C.The system comes with a crosscompiler suite that was developed at Bell Labs.The compiler suite is extremely compact and yetstill manages to produce code that is comparablein terms of size and efficiency with much largercompiler packages.The compiler for a particulararchitecture is typically around 12,000 lines of code.Most of the common processor architectures aresupported by the compiler including:StrongARM,x86,MIPS and PowerPC.For ARM chips the compiler can generate eitherARM or Thumb code.The compiler suitepartitions the work between compiler and linker ina novel way that places more emphasis onoptimization at the linking stage.In the case of theARM,the linker can link mixed ARM and Thumbcode into a single binary enabling the developer tochoose between efficiency of size or performancefor different components.Porting Inferno to a new device based upon one ofthe above architectures is relatively simple comparedto many other operating systems.The Infernokernel has been designed such that there is a welldefined interface between those parts of the systemthat are 'platform specific' and those that are'platform independent'.The interface is small.The 'platform specific' elements are essentially theinterfaces (drivers) to the hardware.Device driversthemselves consist of a platform-specific andplatform-independent part.The latter componentresides within the portable kernel code and providesa uniform representation of the device to theInferno applications above.For example,the 'draw-device' provides a device dependent interface tothe display hardware.The non-portable part of thedriver is responsible for the control of the physical device.Having provided support for the hardware devices,the compilation of the remainder of the kernel isstraightforward. Portable Applications:Inferno applications arewritten in the type-safe language Limbo,whosecompiled representation is identical over allplatforms. 1 Inferno text sheet 8/1/02 11:40 am Page 7 Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENT The block diagram below shows the relationshipbetween the various components of the Infernosystem and the physical hardware.Portability Across EnvironmentsThe traditional perception of an operating system isthat it will take control of the whole of a computingdevice;this is true for most systems includingWindows,Linux and most RTOSs.More recently,operating system developers have come to recognizethat,whilst there are obvious advantages in providingnew environments (particularly those that addressdistributed application development),it is not practicalto replace existing operating systems in all cases.Inferno addresses this problem by providing 'hosted'versions of Inferno that make use of the services ofan existing operating system in order to support theInferno environment.As with all native Infernoports,hosted versions of Inferno provide an identicalenvironment to the application developer.Not all operating systems can act as a host forInferno,a minimum level of functionality must beprovided.There is no Inferno port to DOS,forexample,but there are versions for Windows95/98/2000/NT,Linux,Solaris,Irix,FreeBSD,Where Inferno is hosted on top of an existingoperating system,one can consider Inferno to be a portable application development environmentfor the construction of distributed applications. BrowseridedebuggerWindow Manager ApplicationsWindow ManagerNon-window Manager ApplicationsVirtual Machine(Math, Tk, crypt,É)(ssl, pipe,É)Virtual DeviceDriversNative DriversSocketsWinSockX11Win32sEther802.11USBVGAPort (x86, Sparc, Mips,PowerPC, StrongARM)Windows, Linux, FreeBSD, One of the most difficult tasks facing programmerstoday is the design and development of distributedapplications that will run across a heterogeneousnetwork of computing devices.The difficulty ofwriting such applications is manifested in a numberof ways:The development environments andprogramming technologies vary greatly from onedevice to another.Not all networks are IP,not alldevices are on the Internet.Existing systems vary dramatically in the waythey present their resources.Some devices mayprovide access through a specialized low levelprotocol (a digital camera say),others throughremote procedure calls (RPC),and others throughhigh level protocols not originally intended for thetask (HTTPfor example).Differing policies for security and authenticationmake claims of reliability hard to make.Inferno addresses the first of these points byproviding the same environment everywhere withinthe network,whether on an existing system inhosted mode or native on a new device.The second issue Inferno addresses through asimple,unifying mechanism for the representationof resources in the network.This mechanism isbased upon the import and export of a hierarchicalÔnamespaceÕ.A namespace looks like a hierarchicalfilesystem,but it isnÕt.The names within thenamespace can be accessed as if they were filesusing the file operations ÔopenÕ,ÔcloseÕ,ÔreadÕ andÔwriteÕ.Namespaces can be composed into morecomplex hierarchies representing a collection ofresources.Applications that operate on thesenamespaces are insulated from whether resourcesare,local or remote.The import and export of namespaces is underpinnedby a single,unifying file protocol called Styx.The Styxprotocol is used for access to all resourceslocal or remote.Styx can run over a variety of 2 Inferno text sheet 8/1/02 11:40 am Page 9 Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENT transport protocols (TCP/IP,ATM) and insulatesInferno applications from the type of networkbeing used.Styx can run over simple link-protocols that connect small devices one toanother,for instance,a Lego IR link.Finally,since access to all resources is through theStyx protocol,Inferno has a single point at whichto focus security.As a consequence security is anissue dealt with by the operating system and notby individual applications,as is so often the case.This example describes a home networkthat consists of the following devices:Windows PCVideo RecorderPDA (Compaq iPAQ,for example)The physical connection between thedevices may be as follows:Wireless 802.11b network connecting the iPAQ and the Windows PCEthernet network connecting the PC to the Video RecorderUSB connection from the PC to the Inferno is represented on these devices as follows:Windows PCHosted version of Inferno providing an environmentfor distributed application development.Theapplication that controls the other devices will runfrom this machine though does not have to.iPAQNative version of Inferno that controls the entiredevice including a driver for a PCMCIA Wirelesscard.The iPAQ contains a collection of useful PDAstyle applications and also a simple JPEG viewer forthe user to look at their latest snaps. Video Recorder and Digital CameraBoth of these devices could run Inferno as a nativeoperating system,however,to futher illustrate theflexibility of Inferno we will assume that the VideoRecorder is running a version of Linux and theDigital Camera an RTOS.Instead of replacingthese incumbent operating systems we assume thata Styx protocol stack has been ported to each andoperates as a process inside each of the hostedThe diagram below illustrates this simple network,detailing the namespace presented by each device.The Application - Time Lapse PhotographyThe task we give ourselves is to write a distributedapplication to do time lapse photography.Thephotographs are to be taken at 10 secondintervals.After each photograph is taken it is to becopied to a VCR for playback as a video.Eachimage is to be stored for posterity in some localstore either on the hard disk or on the iPAQ.Using other technologies this modestly complexapplication would require some effort to write.The programmer would have to deal withpotentially four different developmentenvironments using different APIs and conventionson each.Furthermore,it would be difficult toinsulate the application from where the resourcesit is using are located.With Inferno,however,thismodest application could be implemented withvirtually no programming at all.How is that done? /homenetworkWINDOWS RTOS photosjpeg gif jpeg gif NATIVE INFERNO IPAQ Inferno text sheet 8/1/02 11:40 am Page 10 Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENT What follows is a step-by-step example using commands but,obviously,graphics would be used in aconsumer interface.Step One - mount the different name spacesThe ÔnamespaceÕ for each device is first of all mounted under a mount point on the machine that is to runthe application (in our case the PC).The Each mount specifiesthe type ofnetwork (TCPin this case),the IPaddress and the port.The network type can be left out,and in theseexamples the port is left off,defaulting to ÔStyxÕ of course! At each of the IPaddressesand ports specifiedthere must be a process that serves the Styx protocol.Step Two - bind the namespaces togetherThese name spaces are then bound into the name space that our application expects to seeThe last bind command binds part of the Windows files system into the namespace.Theconvention is that the # introduces a reference to a local device,in this case the U specifies the host OSfile system and the remainder of the text indicates a path within the host file system.Step Three - run the application from the PCIn fact lets write the application using a shell script.and VCRand then it enters a loop that involves taking a photo,copying itto the local store and the VCRand then pausing for 10 seconds before repeating the process again.What you notice from this script is that the applicationoperates on the namespace as if it were acollection of files.As far as the application is concerned the namespace isindistinguishablefrom ph 4 Inferno text sheet 8/1/02 11:40 am Page 11 Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENT on the local machine.What you will also notice is that commands are written as text into these files,forThe commands do not have to be text but there are advantages:text is easy to readscripting can be used to implement programsThe camera and VCRneed to interpret the commands sent and to interact with the physical hardware,but this would be true no matter what scheme were used.The advantage of the Inferno architecture isthat the commands to control the device are separated from the protocol for communication.Extensions to the command set to control the device do not require modifications to the Styxcommunication protocol.Step 4 - run the application from the IPAQThis is a trivial change for Inferno.In fact the application remains exactly the same whilst the initialmount and binds are modified as follows:As long as the application is presented with the same namespace it will operate on it regardless of wherethe resources are located.Step 5 - run on the iPAQ store on PCAgain there are no code changesat all in the application,it does not even have to be recompiled.The namespace on the iPAQ will be composed as follows with the directory coming fromthe PC this time. 5 Inferno text sheet 8/1/02 11:40 am Page 12 Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENT Portable ApplicationsInferno applications are written using the Limboprogramming language.It is also possible to writescripts using a programmers shell.The Limbocompiler generates byte code (dis) which isinterpreted by the Inferno virtual machine.The byte code is exactly the same on all Infernoplatforms and hence Limbo applications areabsolutely portable,no buts,no ifs,across all nativeand hosted platforms.The Limbo programming language is similar in manyrespects to C.C programmers will find the transitionto Limbo a simple and painless process.And becauseLimbo is type-safe and includes automatic garbagecollection the code is much easier to write,read andmaintain than many other languages.Limbo is a concurrent programming language,thatis,it contains the constructs necessary to synchronizea collection of co-operating processes or threads,Inferno enables these threads to be executed ondifferent devices and to communicate using Styx orthe namespace metaphor.Not only does Limbosupport the creation of these distributedapplications it also provides the utilities tographically debug them. 6 SummaryGreat simplicity is gained by applying the Infernonamespace metaphorconsistently and aggressivelyto all resources in the network.Indoing so manythings that in other systems would be hard toachieve become trivial.Here are a further two,short examples:The Inferno graphical debugger allows thedeveloper to debug a thread by opening the fileslocated in the directory whereis the process id for the thread.To debug aprocesson another device is trivial,all the userneed do is mount the namespace of the remotedevice and then bind the remote /directorydirectoryHereare the commands to use:bind /n/remote/prog /progThe graphical debugger is blissfully unaware ofwhether the thread to debug is local or remote.Porting InfernoPorting any operating system can be a laborioustask as one incrementally adds support for thevarious hardware devices.It is not until oneimplements a driver for the screen,keyboard and pointer can one begin to interactwith the device.With Inferno one can reach this position muchquicker.Once the basic CPU and networksupport has been completed other resources canbe imported over the network.For example,you could import the screen,keyboard and pointerdevice from another machine:bind /n/remote/dev/keyboard /dev/keboardbind /n/remote/dev/draw /dev/drawbind /n/remote/dev/pointer /dev/pointer Having done so the Inferno kernel can run on thenew device while the user interacts with it usingthe sceen,keyboard and mouse of any other devicerunning Inferno in hosted or native mode. Inferno text sheet 8/1/02 11:40 am Page 13 Inferno: An Overview inferno OPERATING SYSTEM FOR NETWORK APPLICATION DEVELOPMENT Virtual MachineConcurrentProgrammingProtocol forNative OS Environment EmbeddedEnvironmentRoyalty FreeSource CodeJini/JavaXML/SOAPGeneral RTOSLinuxEmbedded LinuxMicrosoft NetInferno333 Support 3333 33333 2 333 3 1333 Built-in modules and device drivers are written in C,but concurrent applications are usually implemented in LimboIn practice embedded Java environments require significant resources.The European STB standard which uses Java has a minimum specification Many embedded Linux offerings charge per-piece royalty fees for the OS and do not give access to the full source code. www.vitanuova.comThere are a large number of operating systems for small devices and a smaller,but still significant,nof distribution protocols and an even smallernumber of concurrent programming languages.In this section Inferno is compared with products from each of these three categories.The products ofmany other companies overlap with the application of Inferno,however,no other technology is socompletein its scope.The table below summarizes the performance of other systems against a number of keyfeatures of distributed computing technologies: 7 Inferno text sheet 8/1/02 11:40 am Page 14