advanced operating systems structured naming by kanna karri

25
ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Upload: berniece-preston

Post on 18-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

ADVANCED OPERATING SYSTEMS

STRUCTURED NAMING

BYKANNA KARRI

Page 2: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

OUTLINE1. Structured Naming

2. Name Spaces

3. Name Resolution– Closure Mechanism

– Linking and Mounting

4. Implementation of Name Space– Name Space Distribution

– Implementation of Name Resolution

Page 3: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

What is Structured Naming?• How to locate an entity given its human‐friendly name?

• Human‐friendly names are structured names composed of several parts – Example: file names, host names

• Structured name – sequence of words

• Name spaces for structured names – labeled, directed graphs

• Example: UNIX file system

• Example: DNS (Domain Name System)– Distributed name resolution

– Multiple name servers

Page 4: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Spaces• Names are commonly organized into what is called a name

space.

• Entities in a structured name space are named by a path name.

• A leaf node represents a named entity (e.g., files) and has the property that it has no outgoing edges.

• A directory node has a number of outgoing edges, each labeled with a name.

• Each path in a naming graph can be referred to by the sequence of labels corresponding to the edges in that path, such as Ni: <label-I, label-2, ..., label-n>

Page 5: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Spaces• no:<home, steen, mbox>,

• it is common practice to use its string representation /home/steen/mbox.

• node n 5 can be referred to by Ihome/steenlkeys as well as /keys.

Page 6: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Spaces• In a naming graph for UNIX, a directory node represents a file

directory, whereas a leaf node represents a file.

• It is generally divided into a boot block, a superblock, a series of index nodes(called inodes), and file data blocks.

• The boot block is a special block of data and instructions that are automatically loaded into main memory when the system is booted.

Page 7: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution• The process of looking up a name is called name resolution.

• consider a path name such as Ni <label v. label g, ... .label:>.

• The name label v is looked up in the directory table, and which returns the identifier of the node to which label v refers.

• Resolution then continues at the identified node by looking up the name label g. in its directory table, and so on.

• resolution stops at the last node referred to by label l;.

Page 8: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution1. Closure Mechanism

• Knowing how and where to start name resolution is generally referred to as a closure mechanism.

• It is necessary to already have access to the directory table of the root node of the appropriate naming graph.

• Example: use of the string "0031204430784".

• Many people will not know what to do with these numbers, unless they are told that the sequence is a telephone number. That information is enough to start the resolution process, in particular, by dialing the number.

Page 9: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution1. LINKING

• An alias is another name for the same entity.

• There are basically two different ways to implement an alias.

• The first approach is to simply allow multiple absolute paths names to refer to the same node in a naming graph.

• Examples: /keys and /home/steen/keys.

• This approach uses hard links.

Page 10: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution1. LINKING

• This principle corresponds to the use of symbolic links.

• The path name/home/steen/keys, which refers to a node containing the absolute path name /keys, is a symbolic link to node n5 .

Page 11: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution2. MOUNTING

• This is used when there is a mounted file system.

• The directory node in the foreign name space is called a mounting point. The mounting point is the root of a name space.

• To mount a foreign name space in a distributed system requires at least the following information:1. The name of an access protocol.

2. The name of the server.

3. The name of the mounting point in the foreign name space.

Page 12: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution2. MOUNTING

• Now consider the name /remote/vu/mbox.

• This name is resolved by starting in the root directory on the client's machine and continues until the node /remote/vu is reached.

Page 13: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Resolution2. MOUNTING

• The process of name resolution then continues by returning the URL nfs:l/flits.cs. vu.nl//home/steen/

• Which in turn leading the client machine to contact the file server flits.cs. vu.nl by means of the NFS protocol, and to subsequently access directory /home/steen.

• Name resolution can then be continued by reading the file named mbox in that directory, after which the resolution process stops.

Page 14: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Implementation of Name Space• Name Space forms heart of naming service.

• Name Servers implements Name Space.

• Large scale systems implement name space hierarchically.

• Such name spaces are partitioned into logical layers.

• 3 layers are used for such name spaces.

Page 15: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Space Distribution• Name spaces for large‐scale distributed systems are organized

hierarchically.

• Name space is distributed and has three logical layers 1. Global layer: highest level nodes (root and its children).

Represent groups of organizations, rare changes

2. Administrational layer: nodes managed by a single organization.

Typically one node per department, infrequent changes

3. Managerial layer: nodes that changes frequently.

Nodes representing hosts, user‐defined directories and files.

• Zone: part of the name space implemented by a separate name server

Page 16: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Space Distribution

Page 17: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Name Space Distribution• A comparison between name servers for implementing nodes

from a large-scale name space partitioned into a global layer, an administrational layer, and a managerial layer.

Page 18: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Implementation of Name Resolution• Each client has access to a local name resolver, which is

responsible for ensuring that the name resolution process is carried out.

• There are 2 ways to implement Name Resolution.

Page 19: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

1. Iterative Name Resolution• Here Name Resolver handles complete name to root server.

• The root server will resolve the path name as far as it can, and return the result to the client.

• At that point, the client passes the remaining path name to that name server. This process is iterated until result is obtained.

• Example: root: «nl, VU, CS, ftp, pub, globe, index.html>

Page 20: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

1. Iterative Name Resolution

Page 21: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

2. Recursive Name Resolution• Instead of returning each intermediate result back to the

client's name resolver.

• With recursive name resolution, a name server passes the result to the next name server it finds.

• It will finally return index.html

Page 22: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

2. Recursive Name Resolution

Page 23: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Advantages and Drawbacks1. Advantages

• Caching results is more affective compared to iterative resolution.

• Communication costs may be reduced.

2. Drawbacks

• High performance name servers may be required to handle complete resolution of a path name.

Page 24: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

Comparision

Page 25: ADVANCED OPERATING SYSTEMS STRUCTURED NAMING BY KANNA KARRI

THANK YOU!!