Unformatted text preview:

COT 4600 Operating Systems Fall 2009Lecture 7NamingBinding and indirectionGeneric naming modelSlide 6Operations on names in the abstract modelName mappingName-mapping algorithms1. Table lookupHow to determine the contextDynamic and multiple contexts2. Recursive name resolutionExample3. Multiple lookupComparing namesName discoveryComputer System OrganizationSlide 19A. The hardware layerSlide 21Bus sharing and optimizationOptimizationSlide 24B. The software layer: the file abstractionSlide 261COT 4600 Operating Systems Fall 2009Dan C. MarinescuOffice: HEC 439 BOffice hours: Tu-Th 3:00-4:00 PM2Lecture 7 22Lecture 7Last time: 2. Interpreters3. Communication LinksInternet or what is behind the abstractions… Today:Naming in computing systemsNext TimeCase Study: Unix File SystemAnnouncements: - no office hours on Thursday, September 17. - Phase 1 of the project is due on Thursday, September 17 - HW 2 is due on Thursday September 24.3Lecture 7 3NamingThe three abstractions (memory, interpreters, communication links manipulate objects identified by name. How could object A access object B:Make a copy of object B and include it in A  use by valueSafe  there is a single copy of BHow to implement sharing of object B?Pass to A the means to access B using its name  use by reference Not inherently safe  both A and C may attempt to modify B at the same time. Need some form of concurrency control.4Lecture 7 4Binding and indirectionIndirection  decoupling objects from their physical realization through names.Names allow the system designer to:1. organize the modules of a system and to define communication patterns among them2. defer for a later time to create object B referred to by object Aselect the specific object A wishes to useBinding  linking the object to names. Examples:A compiler constructs a table of variables and their relative address in the data section of the memory map of the processa list of unsatisfied external referencesA linker binds the external references to modules from libraries5Lecture 7 5Generic naming modelNaming scheme  strategy for naming. Consists of:Name space  the set of acceptable names; the alphabet used to select the symbols from and the syntax rules.Universe of values  set of objects/values to be namedName mapping algorithm  resolves the names, establishes a correspondence between a name and an object/value Context  the environment in which the model operates.Example: searching for John Smith in the White Pages in Orlando (one context) or in Tampa (another context).Sometimes there is only one context  universal name space; e.g., the SSNs.Default context6Lecture 7 6Figure 2.10 from the textbook7Lecture 7 7Operations on names in the abstract modelSimple models: value  RESOLVE (name, context)The interpreter:Determines the version of the RESOLVE (which naming scheme is used)Identifies the contextLocates the objectExample: the processorComplex models support: creation of new bindings: status  BIND(name, value, context)deletion of old bindings: status  UNBIND(name, value)enumeration of name space: list  ENUMERATE(context)comparing names status: result  COMPARE(name1,name2)8Lecture 7 8Name mappingName to value mappingOne-to-One  the name identifies a single objectMany-to-One  multiple names identify one objects (aliasing)One-to-Many  multiple objects have the same name even in the same context.Stable bindings  the mapping never change. Examples:Social Security NumbersCustomerId for customer billing systems9Lecture 7 9Name-mapping algorithms1. Table lookup1. Phone book2. Port numbers  a port the end point of a network connection2. Recursive lookup:1. File systems – path names2. Host names – DNS (Domain Name Server)3. Names for Web objects - URL – (Universal Resource Locator) 3. Multiple lookup  searching through multiple contexts1. Libraries2. Example: the classpath is the path that the Java runtime environment searches for classes and other resource files10Lecture 7 101. Table lookupFigure 2.11 from the textbook11Lecture 7 11How to determine the contextContext references: Default  supplied by the name resolverConstant  built-in by the name resolverProcessor registers (hardwired)Virtual memory (the page table register of an address space)Variable  supplied by the current environmentFile name (the working directory)Explicit  supplied by the object requesting the name resolutionPer objectLooking up a name in the phone book Per name  each name is loaded with its own context reference (qualified name). URLHost names used by DNS12Lecture 7 12Dynamic and multiple contextsContext reference static/dynamic.Example: the context of the “help” command is dynamic, it depends where you are the time of the command.A message is encapsulated (added a new header, ) as flows down the protocol stack:Application layer (application header understood only in application context)Transport layer (transport header understood only in the transport context)Network layer (network header understood only in the network context)Data link layer (data link header understood only in the data link context)13Lecture 7 132. Recursive name resolutionContexts are structured and a recursion is needed for name resolution. Root  a special context reference - a universal name spacePath name  name which includes an explicit reference to the context in which the name is to be resolved.Example: first paragraph of page 3 in part 4 of section 10 of chapter 1 of book “Alice in Wonderland.” The path name includes multiple components known to the user of the name and to name solverThe least element of the path name must be an explicit context referenceAbsolute path name  the recursion ends at the root context. Relative path name  path name that is resolved by looking up its mot significant component of the path name14Lecture 7 14ExampleAliceInWonderland.Chapter1.Section10.Part4.Page3.FirstParagraph Most significant   Least significant15Lecture 7 153. Multiple lookupSearch path  a list of contexts to be searched Example: the classpath is the path that the Java runtime


View Full Document

UCF COT 4600 - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?