Naming CSCI 47806780 Structured Naming Names are organized












- Slides: 12
Naming CSCI 4780/6780
Structured Naming • Names are organized into name spaces • Name space is represented as a directed graph with two types of nodes • Leaf Node – Represents named entity – No outgoing edges – Stores information on the entity it is referring (address or state of the entity) • Directory node – Can have multiple outgoing edges each with a name – Directory table – Contains <edge label, node ID> for each outgoing edge
Name Spaces - Example A general naming graph with a single root node.
More on Name Spaces • Path name: Sequence of edge labels leading from one node to another – N: <label-1, label-2 …. , label-n> • Absolute path name – First node is the root • Relative path name – First node can be arbitrary node • Global name – Denotes same entity where ever it is used • Local name – Interpretation is dependent upon where it is used
Organizing Name Spaces • Tree-based approach – Strict hierarchical approach • Directed acyclic graph – Most commonly used • General graphs – Rarely used • Single root • Multiple root
Name Spaces in Unix File System The general organization of the UNIX file system implementation on a logical disk of contiguous disk blocks.
Name Resolution • Process of looking-up an entity given its path name – Find the corresponding node • Example: N: <label-1, label-2 …. Label-n> – Start at N – Proceed along the edges • A crucial question: Where should the resolution begin? – Which node represents the root? – Unix example: Which i-node corresponds to the root?
Closure Mechanism • • • Knowing how and where to start resolution mechanism – Closure Have a universally agreed upon root In Unix root directory is the first i-node – Actual byte offset is calculated by other values in superblock • HOME variable in Unix – always refers to the user’s home directory
Linking and Mounting • Aliases – Another name for same entity • Two approaches – Multiple absolute path names • Hard links in Unix – Represent entity by a leaf node, but the leaf node stores absolute path name • Return the absolute path name instead of address • Symbolic links in Unix
Mounting • Mounting – Merging different namespaces transparently • File system example – Directory node of one namespace stores identifier of directory node of another namespace – Mount Point – Directory node storing the foreign ID – Mounting Point – Directory node in foreign space – Resolution occurs by looking up mounting point and then accessing its directory table • Can be generalized to other namespaces as well
Mounting Foreign Namespaces • Namespaces on different servers possibly on different machines – Mounting might require network communication • Mounting requires at least three information – Name of access protocol – Name of server – Name of mounting point in foreign space • Each name needs to be resolved – Mounting point needs to be resolved by the foreign server – Three names are represented as a URL – Example: nfs: //flits. cs. vu. nl//home/steen
Mounting - Example Mounting remote name spaces through a specific process protocol. Tracing the resolution of /remote/vu/mbox