World Library  
Flag as Inappropriate
Email this Article

Doors (computing)

Article Id: WHEBN0006642455
Reproduction Date:

Title: Doors (computing)  
Author: World Heritage Encyclopedia
Language: English
Subject: Solaris (operating system), Remote procedure call, IP network multipathing, Service Management Facility, Solaris Trusted Extensions
Collection: Remote Procedure Call, Sun Microsystems Software
Publisher: World Heritage Encyclopedia

Doors (computing)

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


  • History 1
  • Overview 2
  • See also 3
  • References 4
  • External links 5


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.

The doors facility has been ported to Linux, but is only available for version 2.4.18.[2]


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:

    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 credentials or process ID to decide whether the client is allowed to do something.

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 behaviour. 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]

See also


  1. ^
  2. ^
  3. ^

External links

  • Solaris 10 man pages section 3: Realtime Library Functions (man pages for the door-related functions)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.