12.07.2015 Views

Technical Report - Microsoft Research

Technical Report - Microsoft Research

Technical Report - Microsoft Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.2.5 Reflecting into the NamespaceTo facilitate access to the metadata, it is reflected in the system namespace. For example, theI/O system creates a namespace tree describing the mapping of device drivers to the currenthardware. /hardware/locations lists all buses and each location on a bus. A location isrepresented as a directory tree, which contains a symbolic link to the device instance that residesin this location.Similarly, the /hardware/registrations tree lists every driver registered with thesystem. Within this tree, there is one symbolic link pointing to the driver registered for thecorresponding hardware signature prefix.The /hardware/devices tree contains an entry for each instance of a physical device inthe system. The signature of a device (as determined by device enumeration) is reflected in thedirectory structure. Within this tree, each instance of the device is a separate subtree withsymbolic links pointing to corresponding entries in the locations and drivers trees, to show howthe device instance was found, is associated, and is activated.The /hardware/drivers tree lists every registered driver, with a subtree for eachinstantiation of a driver. The names here are based on the namespace name of the driver classitself. For a particular driver, the tree consists of a symbolic link pointing to the executable imageof the driver. It also contains a subtree for each instance of the driver. This subtree holds links tothe corresponding device instance. Also contained in this space are the true bindings for allServiceProviderContract endpoints created for each instance of the driver.Finally, the /dev namespace is a public directory holding symbolic links toServiceProviderContract endpoints in the /hardware/drivers subtree. In this manner,an application can be bound to a public name, without knowing the true name of the driver.5.3 Name ServerSingularity provides a single, uniform name space for all services on a system. The namespace encompasses transient system services, such as device drivers and network connections,and a persistent store in a file system. The name space is implemented by a distinguished (root)name server and services. The name server allows services to register and unregister themselvesin a hierarchical namespace, so they can be discovered by clients. A service responds to requestsand, by implementing the name server’s contract, can extend the name space beyond its mountpoint.The name space is hierarchical. Client programs can access a service by passing a pathnameand fresh channel to the name server. Sample pathnames include: "/filesystems/ntfs" or"/tcp/128.0.0.1/80. Conceptually, the name space consists of directories and services. Directoriesare collections of directories and services that share a common pathname prefix. A service is theactive entity that responds to requests on its registered channel.The entire name space may not exist in a single name server. A service (including oneidentical to the root name server) may register to handle all requests below a point in thehierarchy. Register, deregister, and lookup messages for this subtree are forwarded to the helpername server. This functionality is similar to mount points in Unix file systems. However, theadditional name servers need not operate in the same way as the root one. For example, a TCPservice could export the huge dynamic space of IP addresses and create a connection on demand.Or, a helper name server could implement symbolic links.A slightly simplified form of the name space contract for a client (a server contract includesregistration) is:26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!