written 6.7 years ago by |
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.
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.·
Naming – mapping between logical and physical objects.
■ Multilevel mapping – abstraction of a file that hides the details of how and where on the disk the file is actually stored.
■ A transparent DFS hides the location where in the network the file is stored.
■ For a file being replicated in several sites, the mapping returns a set of the locations of this file’s replicas; both the existence of multiple copies and their location are hidden.
The naming system plays a very important role in achieving the goal of
location transparency,
facilitating transparent migration and replication of objects,
object sharing.
Naming Structures
■ Location transparency – file name does not reveal the file’s physical storage location.
✦ File name still denotes a specific, although hidden, set of physical disk blocks.
✦ Convenient way to share data.
✦ Can expose correspondence between component units and machines.
■ Location independence – file name does not need to be changed when the file’s physical storage location changes.
✦ Better file abstraction.
✦ Promotes sharing the storage space itself.
✦ Separates the naming hierarchy form the storage-devices hierarchy.
Naming Schemes — Three Main Approaches
■ Files named by combination of their host name and local name; guarantees a unique system wide name.
■ Attach remote directories to local directories, giving the appearance of a coherent directory tree; only previously mounted remote directories can be accessed transparently.
■ Total integration of the component file systems.
✦ A single global name structure spans all the files in the system.
✦ If a server is unavailable, some arbitrary set of directories on different machines also becomes unavailable.
1)Absolute names:
<machine name:="" path="" name="">
• Examples: AppleShare, Win NT
• Advantages:
– Finding a fully specified file name is simple.
– It is easy to add and delete new names.
– No global state.
– Scales easily.
• Disadvantages:
– User must know the complete name and is aware of which files are local and which are remote.
– File is location dependent, and thus cannot move.
– Makes sharing harder.
– Not fault tolerant.
2) Mount Points
• Mount Points (NFS - Sun's Network File System)
– Each host has a set of local names for remote locations.
– Each host has a mount table (/etc/fstab) that specifies <remote path="" name="" @="" machine="" name=""> and a <local path="" name="">.
– At boot time, the local name is bound to the remote name.
– Users then refer to the <local path="" name=""> as if it were local, and the NFS takes care of the mapping
• Advantages:
location transparent, remote name can change across reboots
• Disadvantages:
single unified strategy hard to maintain, same file can have different names
3) Global Name Space
• Single name space: CMU's Andrew and Berkeley's Sprite
– No matter which node you are on, the file names are the same.
– Set of workstation clients, and a set of dedicated file server machines.
– When a client starts up, it gets its file name structure from a server.
– As users access files, the server sends copies to the workstation and the workstation caches the files
Advantages:
– Naming is consistent and easy to keep consistent.
– The global name space insures all the files are the same regardless of where you login.
– Since names are bound late, moving them is easier.
• Disadvantages:
– It is difficult for the OS to keep file contents consistent due to caching.
– Global name space may limit flexibility.
– Performance problems.