Sie sind auf Seite 1von 12

4/11/2012

M. Engg. (Computer Systems) Spring Semester 2012

Dr. Muhammad Ali Ismail


Department of Computer & Information Systems Engineering

NED University of Engineering & Technology, Karachi

Naming
Naming is a layer of indirection
Name Resolution

Naming Entities
Name?
A name is a string of bits or characters used to refer to an

entity

Entity can be anything

a resource such as hosts, printers, disks, files, process, Web pages, network connections, etc

Through name resolution processes access system

Entities provide services and can be operated on


To operate on an entity, a process needs to access it and

entities Naming systems implement name resolution In distributed system the naming system is often distributed across multiple machines
3

thus needs an access point (AP)

Address
Name of an AP

4/11/2012

Naming Entities
An entity can offer more than one AP
e.g.1 a person (entity) can have more than one telephone

Naming Entities
Location independent name that is independent

numbers (AP) e.g. 2 a host running a specific service, can have its address formed by the combination of an IP address and a port number

from its address is much easier and more flexible to use

An entity can change its access point


Entity may change an access point or an access point may be reassigned to a different entity e.g. changing job/ISP results in change of email

Naming Entities
An identifier is another type of name. A TRUE identifier has the following properties
It refers to at most one entity Each entity referred to by at most one identifier An identifier always refers to the same entity Never reused!

Naming Entities
Human-friendly names are character based
File names supported by most of the OSes In many computer systems addresses and identifiers are

represented only in machine readable form (e.g., Ethernet address is a random string of 48 bits)

Differentiating point for Address and Identifier 0..1 Identifier 0..1

Routes
Sequences of names or addresses specifying steps to

follow to get to named entities


Entity

4/11/2012

Naming Entities
Name Service One-to-Many Routing Algorithm
9

Name Spaces
Names in a distributed system are organized into a

name space
Name spaces offer a convenient mechanism for

storing and retrieving information about entities by means of names There are many different ways to organize a name space
Tree (strictly hierarchical) Directed Acyclic Graph (DAG)
10

Name Spaces
A name space can be represented as a labeled,

Name Spaces
A directory node is an entity that refers to other nodes. A

directed graph with two types of nodes. Each node is considered as an entity and associated with an identifier A leaf node represents a (named) entity
Attributes in a node describe aspects of the entity the node

directory node contains a (directory) table of (edge label, node identifier) pairs

represents:

Type of the entity An identifier for that entity Address of the entitys location

11

12

4/11/2012

Name Spaces
Root node
A node that has only outgoing

Name Resolution
The process of looking up a name

E.g.
Resolve the path name

and no incoming edges

Path name
This is a sequence of labels

N:<label-1, label-2, , label-n>


Resolution starts at node N, looks up label-1 in directory

N:<label-1, label-2, , label-n>

N: first node in the path if N is root, e.g., n0:<home, steen, mbox> if N is not root

Absolute path name

table, returns the identifier node to which label-1 refers


Resolution continues at the identified node by looking

up the name label-2 in its directory table, and so on


Resolution stops when the node referred to by label-n is

Relative path name

found, and the content of that node is returned

13

14

Name Resolution
Closure Mechanism
Knowing how to start the name resolution process

Aliases
Another name for the same entity Example: environment variable such as HOME

Need to select the initial node from where to start the resolution process (this starting node in many cases is implicit) In file systems, the root directory is accessed and known independent of the name space

Implementing Aliases Method 1: Hard Links

Global Name
denotes the same entity, no matter where that name is used in a system

allow multiple absolute path names to refer to the same node Hard Links

always interpreted with respect to the same node

Local Name
interpretation depends on where the name is being used (e.g.,

environment variable such as HOME in UNIX)

relative name whose directory in which it is contained is implicitly known


15 16

4/11/2012

Aliases
Implementing Aliases Method 2: Symbolic Links

Merging Name Spaces - Approaches


Mounting Global Name Service (GNS)

represent an entity by a leaf node that stores an absolute path name rather than state or address of that entity

17

18

Mounting
Mounted File System
Letting a directory node store the identifier of a

Mounting
The principle of mounting can be generalized to

directory node from a different name space, which we refer to as a foreign name space. The directory node storing the node identifier is called a mount point. The directory node in the foreign name space is called a mounting point.

other name spaces If we want to mount foreign name space NS2 into NS1 it may be necessary to communicate over a network:
Name of an access protocol Name of the server implementing NS2 Name of mounting point in the foreign name space NS2 each of these names needs to be resolved

Normally, the mounting point is the root of a name space. During name resolution, the mounting point is looked up and resolution proceeds by accessing its directory table.
19

20

4/11/2012

Mounting
The name of an access protocol needs to be resolved to the

Global Name Service (GNS)


Add a new root node and make the existing root nodes its

implementation of a protocol by which communication with the server of the foreign name space can take place. The name of the server needs to be resolved to an address where that server can be reached. The name of the mounting point needs to be resolved to a node identifier in the foreign name space.

children
home

Performance issues arise when multiple name spaces are merged.

21

22

Implementation of Name Space


A name space forms the heart of a naming service a service that allows users and processes to add, remove, and look up names.

Implementation of Name Space


Name Space Distribution Implementation of Name Resolution Iterative Resolution Recursive Resolution

A naming service is implemented by name servers.

23

24

4/11/2012

Name Space Distribution


Distributing nodes of the naming graph across multiple

Name Space Distribution


Global Layer
Highest level nodes

machines
Distribute the name resolution process & Distribute name space management

Root nodes and other nodes logically close to the root

Nodes in this layer are stable

Directory tables are rarely changed.

Hierarchical Naming Graph


Global Layer Administrational Layer Managerial Layer

Represent organizations, or groups of organizations

25

26

Name Space Distribution


Administrational Layer Formed by directory nodes that together are managed within a single organization.
A characteristic feature of the directory nodes in the

Name Space Distribution


Administrational Layer
E.g. there may be a directory node for each department in

an organization, or a directory node from which all hosts can be found.


Another directory node may be used as the starting point

administrational layer is that they represent groups of entities that belong to the same organization or administrational unit.

for naming all users, and so forth.


The nodes in the administrational layer are relatively

stable, although changes generally occur more frequently than to nodes in the global layer

27

28

4/11/2012

Name Space Distribution


Managerial Layer Nodes which change regularly

Name Space Distribution

E.g. nodes representing local hosts, files, etc.

In contrast to the global and administrational layer, the

nodes in the managerial layer are maintained not only by system administrators, but also by individual end users of a distributed system

29

A zone is implemented by a separate name server

30

Availability and Performance


Global Layer
High availability is very critical; if name server fails, a large part of

Availability and Performance


Administrational Layer
Availability for a name server in the administrational

the address space is unreachable


Results of lookups generally remain the same for a long time

caching very efficient No quick response needed at this layer


Throughput may be important though for large scale systems (many

layer is primarily important for clients in the same organization as the name server.

simultaneous users)
Replicating servers, in combination with client-side caching are

If the name server fails, many resources within the organization become unreachable because they cannot be looked up.

it may be less important that resources in an organization are temporarily unreachable for users outside that organization.

used
Updates in this layer generally do not have to come into effect

immediately, making it much easier to keep replicas consistent.


31 32

4/11/2012

Availability and Performance


Administrational Layer
With respect to performance, name servers in the administrational

Availability and Performance


Administrational Layer
Likewise, updates should generally be processed quicker than those

layer have similar characteristics as those in the global layer.

of the global layer.

Because changes to nodes do not occur very often, caching lookup results can be highly effective, making performance less critical.

E.g., it is unacceptable that an account for a new user takes hours to become effective.

In contrast to the global layer, the administrational layer should

These requirements can generally be met by using high-

take care that lookup results are returned within a few milliseconds, either directly from the server or from the clients local cache.

performance machines to run name servers.


In addition, client-side caching should be applied, combined with

replication for increased overall availability.

33

34

Availability and Performance


Managerial Layer
Availability requirements for name servers at the

Availability and Performance

managerial level are generally less demanding.


In particular, it often suffices to use a single (dedicated)

machine to run name servers at the risk of temporary unavailability.


However, performance is crucial.

Users expect operations to take place immediately. Because updates occur regularly, client-side caching is often less effective
35

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.

36

4/11/2012

Availability and Performance


In distributed systems, name servers in the global and

Implementation of Name Resolution


Assume name servers are not replicated and there

administrational layer are the most difficult to implement.


Difficulties are caused by replication and caching, which are needed

are no client-side caches


Each client has access to a local name resolver,

for availability and performance, but which also introduce consistency problems.
Some of the problems are aggravated by the fact that caches and

replicas are spread across a wide-area network, which introduces long communication delays thereby making synchronization even harder.

which is responsible for ensuring that the name resolution process is carried out Two types of name resolution
Iterative name resolution Recursive name resolution

37

38

Implementation of Name Resolution


Assume the following (absolute) path name is to be

Iterative Name Resolution

resolved. root:<nl, vu, cs, ftp, pub, globe, index.txt>

In practice, the last step, namely contacting the FTP server and requesting it to transfer the file with path name ftp:<pub, globe, index.txt>, is carried out separately by the client process.
39 40

10

4/11/2012

Recursive Name Resolution

Recursive Name Resolution


Drawback puts a higher performance demand on each name server.

a name server is required to handle the complete resolution of a path name this additional burden is generally so high that name servers in the global layer of a name space support only iterative name resolution

41

42

Recursive Name Resolution


Advantage 1 communication costs may be reduced.
New York

Recursive Name Resolution


Advantage 2 Caching results are more effective compared to iterative name resolution.

Karachi

43

44

11

4/11/2012

Recursive Name Resolution Example: Domain Name System


Advantage 2
The benefit of this approach is that, eventually, lookup
Internet Domain Name System (DNS) is one of the largest distributed naming services. Works well more than 30 years after its introduction. Primarily used for looking up host addresses and mail servers Organized as a Label is a case-insensitive string made up of alphanumeric characters; maximum length 63 characters Maximum length of a complete path: 255 characters The string representation of a path name consists of listing its labels, starting with the rightmost one, and separating the labels by a dot (.).

operations can be handled extremely efficiently.


For example, suppose that another client later requests

resolution of the path name root:<nl, vu, cs, flits>.


This name is passed to the root, which can immediately

forward it to the name server for the cs node, and request it to resolve the remaining path name cs:<flits>.

The root is represented by a dot E.g. the path name root:<nl, vu, cs, flits>, is represented by the string flits.cs.vu.nl.

Label attached to a nodes incoming edge is used as name of the node A subtree is called a domain Domain Name

a path name to the root of a domain

Can be relative or absolute 46

45

DNS: Subdomains
One domain is a subdomain of another if its apex node

is a descendant of the others apex node


More simply, one domain is a subdomain of another if

its domain name ends in the others domain name


E.g. sales.nominum.com is a subdomain of

nominum.com

47

12

Das könnte Ihnen auch gefallen