For faster navigation, this Iframe is preloading the Wikiwand page for Doors (computing).

Doors (computing)

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages) The topic of this article may not meet Wikipedia's notability guidelines for products and services. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted.Find sources: "Doors" computing – news · newspapers · books · scholar · JSTOR (August 2012) (Learn how and when to remove this message) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Doors" computing – news · newspapers · books · scholar · JSTOR (July 2012) (Learn how and when to remove this message) (Learn how and when to remove this message)

Doors is an inter-process communication facility for Unix computer systems. They provide a form of procedure call.

History

[edit]

Doors were developed by Sun Microsystems as a core part of the Spring operating system, then added to Solaris in version 2.5 as an undocumented internal interface.[1] They became a documented feature in Solaris 2.6. Recent versions of Solaris use Doors in many places, including nscd (the name service cache daemon) and syslog.

A Linux port of Doors was released in 2003, but is only available for version 2.4.18.[2]

Overview

[edit]

The Doors subsystem is implemented as a user-space library with some kernel support, and relies heavily on threads. It is designed for low overhead, and the Solaris implementation uses some assembly code for maximum efficiency.

Doors are created by server processes (which must use threads) and called by client processes. It is possible for one process to both create and call a door. When creating a door, the server must specify a server procedure, which will be called by the Doors library on behalf of clients. Unlike most remote procedure call systems, each door has only one server procedure. A server can "attach" a door to a file, enabling clients to connect to that door simply by opening that file. The ls -l command will then show the file with a 'type' of "D" (not to be confused with "d" for a directory) — for example:

$ ls -l
total 9
Drw-r--r-- 1 jmorrison dev 876 Dec  8 19:43 myfile

Clients use door_call() to invoke the door's server procedure, passing a contiguous region of memory and a list of file descriptors as arguments, and getting back another contiguous region and list of file descriptors. Either region may be empty, as may either list. Usually, two C structs will be defined, one for the input data and one for the output data. (Alternatively, tagged unions may be used, allowing a door procedure to provide multiple actions in much the same way as the ioctl system call.) Every file descriptor is accompanied by a flags word. The DOOR_RELEASE flag requests that a file descriptor be closed in the sending process after being duplicated in the receiving process. If a file descriptor that refers to a door is sent, the system records the properties of that door in the flags word.

As well as representing a procedure, or a group of procedures, a door can represent a stateful data object, making it possible to pass references to such objects between processes. Such a door would typically take a tagged union as input data with each tag value denoting a different method.

The Doors system also provides a way for clients and servers to get information about each other. For example, a server can check the client's user or process ID to implement access control.

The Doors library normally creates and manages a pool of threads in the server process to handle calls, but it is possible to override this behavior. The Doors system does not provide any form of synchronization, but servers can use the normal thread-level synchronization primitives. Doors can be used to synchronize access to shared memory segments, allowing single-copy data transfer.[3]

The Doors concept is very similar to X/Open XATMI API specification, where client processes invoke server processes' exposed functions: door_call() is analogous to tpcall() in XATMI clients, while door_return() is analogous to tpreturn() in XATMI servers.

See also

[edit]

References

[edit]
  1. ^ "dsvclockd(1M): Using Doors to Implement Inter-Process Readers/Writer Locks". meem simplex. June 14, 2005. Archived from the original on 2012-10-22. Retrieved 2012-03-20.
  2. ^ "Namefs and Solaris Doors for Linux".
  3. ^ [dead link]http://developers.sun.com/solaris/articles/fastSockets.html
[edit]
{{bottomLinkPreText}} {{bottomLinkText}}
Doors (computing)
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?