Handle (computing)

When handle ( English for " handle " or " handle" ) is referred to in the computer science a unique reference value to a managed system from the operating system resource, such as screen objects, or individual files on hard drives. When an application program wants to use such a resource, it receives by calling an appropriate system function (for example, for opening or creating files) as the return value of the reference, which is to provide for further use of the resource by system functions ( for example to read from a file).

The operating system checks when opening a resource access rights, shall - if needed - needed internally to management structures and coordinates further access attempts by other applications on the resource in question. Is an application that resource by a closing call is free again, the administrative structures to be dismantled, and the handle is invalid.

Other names that will come with a more specific meaning depending on the use, in addition to handle ( Microsoft Windows), Capability ( academic) or descriptor ( POSIX). The terminology is not consistent across different systems. For example, POSIX capabilities are no references to specific system resources, but represent the permission to perform a certain action.

If there is a file in the corresponding system resource, the handle (e.g., K & C R ) also known as a file handle or file descriptor pointer.

A handle combines the identification of a system resource access rights. For example, an application that opens a file through a system call with write permission, by obtaining the handle below to perform write operations on the file by the handle is specified as the target of the operation.

The principle can be illustrated by comparing it with a reference number in all correspondence with offices. As a citizen you do not get immediate access to the documents, but takes by specifying a shop sign with respect to the previous operation.

File handle

In programming with assembler and other programming languages ​​, there are function calls to open or create files that return an integer. This number is positive, then this is a handle to a file, that can be used for more operations to the file with. In almost all implementations of the C programming language for today's PC operating systems at any value of type FILE * contains a file handle. The standard streams stdin, stdout, and stderr are then in handle but the values ​​0.1 or 2 This is not part of standard C, but will implement a UNIX operating systems, and then often assumed convention.

The NFS protocol for file access over a network using file handles for the addressing of file operations.

Other meanings

In Matlab prepending the @ sign creates a function handle, which is similar to function pointers in C to be OK.

For Windows HANDLE is defined as data type, more resource-specific data types are derived thereof (eg b. HBITMAP or HBRUSH ).

Handle systems serve the procurement and management of identifiers on the World Wide Web, which are also known as handles. Similar to the Domain Name System is the Handle System in this sense, a method for the resolution of namespaces represents an appropriate use of such handles that is known in German-speaking countries, are Digital Object Identifiers. Another system is the Persistent Uniform Resource Locators.

219515
de