![]() ![]() ![]() ![]() |
Naming and Directory Concepts |
The primary function of a naming system is to map names to objects. It maps people-friendly names to addresses, identifiers, or objects typically used by computer programs. For example, the Internet Domain Name System (DNS) maps machine names (such as www.sun.com) to IP addresses (like 192.9.48.5). A file system maps a file name (c:\bin\autoexec.bat for example) to a file handle that a program can use to access the contents of the file. These two examples also illustrate the wide range of scale at which naming services exist--from an entity on the Internet to a file on the local file system.Names
Every name is generated by a set of syntactic rules called naming conventions. An atomic name is an indivisible component of a name, as defined by the naming convention. A compound name represents a sequence of zero or more atomic names composed according to the naming convention.
For example, the UnixTM file system's naming convention is that a file is named from its path relative to the root of the file system, with each component in the path separated left-to-right using the slash character ('/'). According to this convention, each component in the path is an atomic name because it cannot be broken down any further. The path name of the file is a compound name. For example, the Unix path name usr/local/bin is a compound name representing the sequence of atomic names usr, local, and bin. In names from DNS, atomic names are ordered from right to left, and are delimited by dot characters ('.'). Thus, the DNS name sales.Wiz.COM is a compound name representing the sequence of atomic names COM, Wiz, and sales.
Bindings
The association of an atomic name with an object is called a binding. For example, a file name is bound to a file. The DNS contains machine-name-to-IP-address bindings.References and Addresses
The reference of an object contains one or more communication end points, or addresses. Depending on the naming service, some objects cannot be stored directly. A reference is one means by which such an object can be bound and accessed. A file object, for example, is accessed using a file reference, or file handle as it is often called.
For simplicity, an object reference and the object it refers to are sometimes used interchangeably in this tutorial.
Context and Resolution of Names
A context is an object whose state is a set of bindings with distinct atomic names. Every context has an associated naming convention. A context provides a lookup (resolution) operation that returns the object, and may provide operations such as those for binding names, unbinding names, and listing bound names. An atomic name in one context object can be bound to another context object of the same type (having the same naming convention), called a subcontext, giving rise to compound names.
Resolution of compound names proceeds by looking up each successive atomic component in each successive context. In the Unix file system, for instance, directories serve as contexts, path names are compound names, and individual directory or file names are atomic names.
Naming Systems and Namespaces
A naming system is a connected set of contexts of the same type (having the same naming convention) and providing the same set of operations with identical semantics. For example, the naming component of the Unix file system is a naming system. DNS is a naming system.
A naming system provides a naming service to its customers for performing naming-related operations. A naming service is accessed through its interface. For example, the DNS offers a naming service that maps machine names to IP addresses.
A namespace is a set of all names in a naming system. For example, the Unix file system has a namespace consisting of all the files and directories in that file system.
![]() ![]() ![]() ![]() |
Naming and Directory Concepts |