Futex

A futex (English almost userspace mutual exclusion as " fast mutual exclusion in userspace ") is a mutex Lockingmechanismus, which is supported by the Linux operating system. The peculiarity of the futex implementation is that a large part of the operations executed in user space, and thus expensive calls to the kernel to be avoided. In contrast to a mutex Futex therefore serves to synchronize belonging to a process threads.

The implementation is derived from Hubertus Franke (IBM Thomas J. Watson Research Center), Matthew Kirkwood, Ingo Molnar ( Red Hat ) and Rusty Russell (IBM Linux Technology Center ), and was from version 2.5.7 part of the Linux kernel.

As a mutex is a Futex a memory location is changed by various atomic processes by blocking and Entsperroperationen ( LOCK / UNLOCK ). The lock operation ensures this is that all processes are blocked, the wish to lock a locked already Futex itself ( mutual exclusion ). Unlike mutexes the futex operations but in the statistically relevant cases in userspace (that is, directly from the current program ) is executed and the kernel is only called when a process needs to be blocked or activated.

Linux supports Futexe for most, but not all processor architectures.

Generally implemented a User Program, the futex operations not directly, but it uses the " pthread_mutex ... ()" functions in libc, use the automatically depending on the processor architecture Futexe or interprocess mutex implementation.

The fact that not for each call, the operating system is involved, Futexe are more efficient in general. Because the operating system no longer has control over all the locks, it came in the early stages partly to problems when processes are crashed with locked Futex. These problems were solved by robust Futexe, but the use of Futexen still requires increased attention.

357362
de