Method and system for robust futexes
First Claim
Patent Images
1. A method of managing primitives, the method comprising:
- selecting a free futex from a plurality of futexes in response to a request by the first computer process, wherein the first computer process acquires the futex;
registering a private data structure that is stored in user space,wherein the private data structure tracks the futex that is held by a first computer process running in the user space,wherein the private data structure is private to the first computer process, and wherein the futex serves as a lock on a resource provided by a computer system;
linking the futex held by the first computer process to the private data structuredetecting a termination of the first computer process that maintains the lock on the resource after termination;
searching the private data structure to identify the futex that is held by the first computer process that terminated; and
releasing the futex if the futex is identified as being held by the first computer process.
0 Assignments
0 Petitions
Accused Products
Abstract
An embodiment relates to a method of managing primitives. The method includes providing a data structure available in user-space where the data structure comprises at least one futex. The method also includes detecting a termination of the process and searching the data structure for status of the at least one futex. The method further includes releasing the at least one futex in response to status of the at least one futex being held and setting a flag for at least one futex. The method further includes notifying at least one process waiting for the released at least one futex.
6 Citations
17 Claims
-
1. A method of managing primitives, the method comprising:
-
selecting a free futex from a plurality of futexes in response to a request by the first computer process, wherein the first computer process acquires the futex; registering a private data structure that is stored in user space, wherein the private data structure tracks the futex that is held by a first computer process running in the user space, wherein the private data structure is private to the first computer process, and wherein the futex serves as a lock on a resource provided by a computer system; linking the futex held by the first computer process to the private data structure detecting a termination of the first computer process that maintains the lock on the resource after termination; searching the private data structure to identify the futex that is held by the first computer process that terminated; and releasing the futex if the futex is identified as being held by the first computer process. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. An apparatus for managing primitives in a computer system, the apparatus comprising:
-
a private data structure stored in user space, the private data structure being configured to track a futex that is held by a first computer process running in the user space, wherein the private data structure is private to the first computer process, and wherein the futex serves as a lock on a resource provided by a computer system; and a futex module configured to; select a free futex from a plurality of futexes in response to a request by the first computer process, wherein the first computer process acquires the futex; link the futex held by the first computer process to the private data structure register the private data structure; detect a termination of the first computer process that maintains the lock on the resource after termination; search the private data structure to identify the futex that is held by the first computer process that terminated; and release the futex if the futex is identified as being held by the first computer process. - View Dependent Claims (11, 12, 13)
-
-
14. A system for managing primitives, comprising:
-
a memory configured to store a private data structure in user space, the private data structure being configured to track a futex that is held by a first computer process running in the user space, wherein the private data structure is private to the first computer process, and wherein the futex serves as a lock on a resource provided by a computer system; and a processor coupled to the memory and configured to; select a free futex from a plurality of futexes in response to a request by the first computer process, wherein the first computer process acquires the free futex; register the private data structure; link the futex held by the first computer process to the private data structure; detect a termination of the first computer process that maintains the lock on the resource after termination; search the private data structure in the memory to identify the futex that is held by the first computer process that terminated; and release the futex if the futex is identified as being held by the first computer process. - View Dependent Claims (15, 16, 17)
-
Specification