You are on page 1of 51

DISTRIBUTED SYSTEM

Chapter 5
Naming System in DS
Objectives
•After accomplishing this chapter, Students will be able to understand:

What is Naming System?


Feature of Good Naming system
Define Naming Space
Importance of Naming System
Types of Naming System
Naming in Distributed System


Names are used to share resources, uniquely identify entities and refer to

features in the distributed system.


Names play a very important role in all computer systems and they are used

to share resources, to uniquely identify entities, to refer to locations, and

more information about the given entities.


An important issue with naming is that a name can be resolved to the entity

it refers to resolve names, it is necessary to implement a naming system.


Cont…


A Name is a string composed of a set of symbols chosen from a finite alphabet

and is also called an identifier because it is used to denote/indicate or identify

an object.


A name may also be supposed of as a logical object that identifies a physical

object to which it is bound from among a collection of physical objects.


Therefore, the correspondence between names and objects is the relation of

binding logical and physical objects for the purpose of object identification.
Cont…

The essential issue with naming in the distributed system is that a name can be

resolved to the entity it refers to and Name Resolution thus allows a process to access

the named entity.


To Resolve Names, it is necessary to implement a naming system and the difference

between naming in distributed systems and non distributed systems lies in the way

naming systems are implemented.


In a distributed system, the implementation of a naming system is itself often

distributed across multiple machines.


Cont…

The naming facility of a distributed operating system enables users and programs to

assign character-string names to objects and subsequently use these names to refer to

those objects.


The locating facility, which is an integral part of the naming facility, maps an object's

name to the object's location in a distributed system.


The naming and locating facilities jointly form a naming system that provides the

users with an abstraction of an object that hides the details of how and where an object

is actually located in the network.


Cont…


It provides a further level of abstraction when dealing with object

replicas.


Given an object name, it returns a set of the locations of the object's

replicas.


The Naming System Plays a very important role in achieving the goal

of location transparency, facilitating transparent migration and

replication of objects, object sharing.


Cont…


A name in a distributed system is a string of bits or characters that is used to refer

to an entity and an entity in a distributed system can be practically anything.


Typical examples include resources such as hosts, printers, disks, and files.


Other well-known examples of entities that are often explicitly named are

processes, users, mailboxes, newsgroups, Web pages, graphical windows,

messages, network connections, and so on.


Cont…

In principle, a naming system maintains a name-to-address


binding which in its simplest form is just a table of (name,

address) pairs.

However, in distributed systems that span large networks and


for which many resources need to be named, a centralized table is

not going to work.


Cont…

Name: A name in a distributed system is a string of bits or


characters used to refer to an entity found in the distributed
system.

Why we need names in a computer and distributed system?


• To refer to and operate on entities such as hosts, printers, disks, and
files etc.

• To resolve names a naming system is needed.


Cont…

To operate on an entity, we need to access it.


i.e., to obtain an entity’s access points (addresses).

For example, the following is STBC’s intranet access point: URL=


intranet.stbc.edu.et and IP=10.144.5.50.

Resolve URL into IP address of the server(how??)

For a running server process, its transport-level address (IP address,


port number) serves as its access point.
Naming

Using address to refer to an entity is:


• Inflexible, human unfriendly, subject to changes.
• An entity changes address, address reassigned to another entity.
• An entity has more than one address (access point), which one to
use as a reference?

Easier and more flexible to use location independent names.


What is Naming Entities?
An entity can be anything
An entity can be operated on
To operate on an entity we need an access point
An access point in a DS is called address
An address is a special type of name
A name for an entity independent from its address is called
location independent.
Cont…
• A true identifier is a special type of name that uniquely identifies an
entity and has the following properties:

•An identifier refers to at most one entity

•Each entity is referred to by at most one identifier

•An identifier always refers to the same entity

•Human friendly name is another type of name


Name Space
Names in a DS are organized in a Name Space which is the collection
of valid names recognized by a name service, a precise specification is
required, giving the structure of names.
Cont…

• A Naming Space can be represented as a directed graph with leaf

nodes (containing entity information) and directory nodes.

• Absolute and relative path names are related to a directory node.

• A global name denotes the same entity in the system.

• A local name depends on where the name is being used


What is a Naming System

• Name System Maintains a name-to-address binding to resolve


name (or identifier) to address.

• The implementation of naming systems in distributed and non-


distributed systems are quite different.
• Say, how to locate a process in a uniprocessor system?
Cont…

• The Naming System is one of the most important components of a


distributed operating system because it enables other switches and objects

to be identified and accessed in a uniform manner.

• In spite of the importance of names, no general unified treatment of them


exists in the literature.

• This section defines and explains the fundamental terminologies and


concepts associated with object naming in distributed systems.
Desirable Features of A Good Naming System

•1. Location Transparency: Location transparency means that the name of an object
should not disclose any hint as to the physical location of the object.

•That is, an object's name should be independent of the physical connectivity or


topology of the system, or the current location of the object.

•2.Location Independency: For performance, reliability, availability, and security


reasons, distributed systems provide the facility of object migration that allows the

movement and relocation of objects dynamically among the various nodes of a

system.
Cont…
•3. Scalability: Distributed systems vary in size ranging from one with a few nodes to one
with many nodes.

•Moreover, distributed systems are normally open systems, and their size changes
dynamically.

•Therefore, it is impossible to have an a priori idea about how large the set of names to be
dealt with is liable to get.

•Hence a naming system must be capable of adapting to the dynamically changing scale of
a distributed system that normally leads to a change in the size of the name space.
Cont…

•4.Uniform Naming Convention: In many existing systems, different ways

of naming objects, called naming conventions, are used for naming

different types of objects.

•For example, file names typically differ from user names and process
names and instead of using such nonuniform naming conventions, a good

naming system should use the same naming convention for all types of

objects in the system.


Cont…

5. Multiple User-Defined Names for the Same Object: For a shared object, it is

desirable that different users of the object can use their own convenient names for

accessing it.

•Therefore, a naming system must provide the flexibility to assign multiple user-

defined names to the same object.

•In this case, it should be possible for a user to change or delete his or her name for

the object without affecting those of other users.


Cont…

•6. Group Naming: A naming system should allow many different objects to be
identified by the same name.

Such a facility is useful to support broadcast facility or to group objects for

conferencing or other applications.

• 7. Meaningful Names: A name can be simply any character string identifying


some object.

•However, for users, meaningful names are preferred to lower level identifiers such
as memory pointers, disk block numbers, or network addresses.
Cont…

•This is because meaningful names typically indicate something


about the contents or function of their referents, are easily
transmitted between users, and are easy to remember and use.

•Therefore, a good naming system should support at least two


level of object identifiers, one convenient for human users and
one convenient for machines.
Cont…

•8. Performance: The most important performance measurement of a naming


system is the amount of time needed to map an object's name to its attributes,

such as its location.

•In a distributed environment, this performance is dominated by the number of


messages exchanged during the name-mapping operation.

•Therefore, a naming system should be efficient in the sense that the number of
messages exchanged in a name-mapping operation should be as small as

possible.
Cont…

9. Fault Tolerance: A naming system should be capable of tolerating, to

some extent, faults that occur due to the failure of a node or a

communication link in a distributed system network.

•That is, the naming system should continue functioning, perhaps in a


degraded form, in the event of these failures.

•The degradation can be in performance. functionality, or both but should be


proportional, in some sense, to the failures causing it.
Cont…

•10. Replication Transparency: In a distributed system, replicas of an


object are generally created to improve performance and reliability.

•A naming system should support the use of multiple copies of the


same object in a user-transparent manner.

•That is, if not necessary, a user should not be aware that multiple
copies of an object are in use.
Cont…
Cont…

•11. Locating the Nearest Replica. When a naming system supports the
use of multiple copies of the same object, it is important that the object-

locating mechanism of the naming system should always supply the

location of the nearest replica of the desired object.

•This is because the efficiency of the object accessing operation will be


affected if the object-locating mechanism does not take this point into

consideration.
Cont…

• This is illustrated by the example given below, where the desired


object is replicated at nodes N1, N2, and N3 and the object-locating
mechanism is such that it maps to the replica at node N3 instead of the
nearest replica at node N1. Obviously this is undesirable.
Type of Naming System

• Part I: Flat Naming.


• Resolves identifiers to addresses

• Part II: Structured Naming.


• Resolves structured human-friendly names to addresses

• Part III: Attributed-Based Naming.


• Resolves descriptive names to addresses
Flat Naming
• An important property of such a name is that it does not contain any information whatsoever on
how to locate the access point of its associated entity.

• In the following, we will take a look at how flat names can be resolved, or, equivalently, how we
can locate an entity when given only its identifier.

• To do this the following resolve technique will used in the flat naming system:

 Simple Solutions(Broadcasting and Forwarding Pointers Name Resolution)


 Home-Based Solutions
 Distributed Hash Table(Reding)
 Hierarchical Approach
Broadcasting
• Consider a distributed system built on a computer network: that offers efficient
broadcasting facilities.

• Typically, such facilities are offered by local-area networks in which all machines are
connected to a single cable or the logical equivalent thereof. Also, local-area wireless
networks fall into this category.

• Locating an entity in such an environment is simple: a message containing the identifier


of the entity is broadcast to each machine and each machine is requested to check whether
it has that entity.

• Only the machines that can offer an access point for the entity send a reply message
containing the address of that access point.
Broadcasting

• Broadcasting becomes inefficient when the network grows and not only is

network bandwidth wasted by request messages, but, more seriously, too many

hosts maybe interrupted by requests they cannot answer.

• One possible solution is to switch to multicasting, by which only a restricted

group of hosts receives the request.

• For example, Ethernet networks support data-link level multicasting directly in

hardware.
Broadcasting
Forwarding Pointers
• Another popular approach to locating mobile entities is to make use of forwarding pointers and the

principle is simple: when an entity moves from A to B, it leaves behind in A a reference to its new location

at B.

• The Main Advantage of this approach is its simplicity: as soon as an entity has been located, for example

by using a traditional naming service, a client can look up the current address by following the chain of

forwarding pointers.

• Example: postal service

One person moves from Arba Minch  Hawassa  Addis Ababa  Adama  Dire Dawa  Harar…….
Forwarding Pointers…

• Figure 5-1 Redirecting a forwarding pointer by storing a shortcut in a client stub.


Drawbacks of Forwarding Pointers

• There are also a number of important drawbacks.


 First, if no special measures are taken, a chain for a highly mobile entity can become so long that
locating that entity is too expensive.

 Second, all intermediate locations in a chain will have to maintain their part of the chain of
forwarding pointers as long as needed.

 A third (and related) drawback is the vulnerability to broken links.

 As soon as any forwarding pointer is lost (for whatever reason) the entity can no longer be reached.

• An important issue is, therefore, to keep chains relatively short, and to ensure that forwarding
pointers are robust.
Broadcast vs. Forward Pointer

• Broadcasting:
• Scalability problems
• Efficiency problems in large scale systems

• Forwarding Pointers:
• Geographical scalability problems
• Long chains: performance problem
• Prone to failure
Home-Based Approach
• The use of broadcasting and forwarding pointers imposes scalability problems
and broadcasting or multicasting is difficult to implement efficiently in largescale
networks whereas long chains of forwarding pointers introduce performance
problems and are susceptible to broken links.

• A popular approach to supporting mobile entities in large-scale networks is to


introduce a home location, which keeps track of the current location of an entity.

• Special techniques may be applied to safeguard against network or process


failures and in practice, the home location is often chosen to be the place where
an entity was created.
Cont…
• When the home agent receives a packet for the mobile host, it looks up the host's
current location and if the host is on the current local network, the packet is
simply forwarded.

• Otherwise, it is tunneled to the host's current location, that is, wrapped as data in
an IP packet and sent to the care-of address.

• At the same time, the sender of the packet is informed of the host's current
location. This principle is shown in next slid.

• Note that the IP address is effectively used as an identifier for the mobile host.
Cont….
Home-Location: popular for supporting mobile entities in large-scale networks.
Keeps track of the current location and often, the place where an entity is created
Hierarchical Approaches

• In a hierarchical scheme, a network is divided into a collection of domains and there


is a single top-level domain that spans the entire network.

• Each domain can be subdivided into multiple, subdomains and a lowest-level domain,
called a leaf domain, typically corresponds to a local-area network in a computer
network or a cell in a mobile telephone network.

• Each domain D has an associated directory node dirt D that keeps track of the entities
in that domain.

• The directory node of the top-level domain, the root (directory) node, knows about all
entities and this general organization of a network into domains and directory nodes.
Cont…
Cont…

• One top level domain.


• Several sub-domains.
• Lowest-level domain = leaf, stores address
• A domain D has directory node dir(D)
• dir(D) keeps track of all entities in D
• Each entity is represented by a location record in dir(D)
• Root has records for all entities
Structured Name system
• Names are commonly organized into what is called a name space.

• Name space for structured names can be represented as a labeled, directed


graph with two types of nodes- leaf nodes and directory nodes.

• A leaf node represents a named entity and has no outgoing edges.

• It stores information on the entity it is representing for example its address


so that a client can access it.

• A directory node has a number of outgoing edges each labeled with a name.
Attributed-Based Name System

Flat and structured names generally provide a unique and location-independent way
of referring to entities.

However, location independence and human friendliness are not the only criterion
for naming entities.

As more information is being made available it becomes important to effectively


search for entities Users must be able to search the entity by merely providing any
description about the entity.

Attribute-based naming: Allows an entity to be described by (attribute, value) pairs.


This allows a user to search more effectively by constraining some of the attribute.
Cont…

As more information becomes available, it becomes important to


effectively search for entities and the user should be able to search based
just on some attributes.

 In particular, as more information is being made available it becomes


important to effectively search for entities.

 By specifying which values a specific attribute should have, a user


essentially constrains the set of entities that he is interested in.
Cont…

It is up to the naming system to return one or more entities that meet the user's
description.

In this approach, an entity is assumed to have an associated collection of attributes.


Each attribute says something about that entity.
 Attribute-based naming systems are also know as directory services.
More general model is using resource description framework (RDF).
Resources are described as triplets consisting of a subject, predicate and an object.
E.g. (person, name, Alice).
Summary

• Naming organization of names and name resolution are key issue in any
distributed systems.

• Locating entities is an open research issues and there are few methods like
Forwarding pointers, hierarchical approaches, home based approaches and pointer

caches but each has its own short comings.

• Reference counting, advanced reference counting and Reference listing are few
methods that can be used for unreferenced objects.
Thank You!!

You might also like