Value recycling facility for multithreaded computations
First Claim
1. A lock-free method of managing a set of values in a multithreaded computation the method comprising:
- indicating an intention to use a particular one of the values; and
as a condition precedent to use of the particular value, determining that the indication was sufficient to prevent recycling of the particular value.
2 Assignments
0 Petitions
Accused Products
Abstract
Solutions to a value recycling problem facilitate implementations of computer programs that may execute as multithreaded computations in multiprocessor computers, as well as implementations of related shared data structures. Some exploitations allow non-blocking, shared data structures to be implemented using standard dynamic allocation mechanisms (such as malloc and free). Some exploitations allow non-blocking, indeed even lock-free or wait-free, implementations of dynamic storage allocation for shared data structures. In some exploitations, our techniques provide a way to manage dynamically allocated memory in a non-blocking manner without depending on garbage collection. While exploitations of solutions to the value recycling problem that we propose include management of dynamic storage allocation wherein values managed and recycled tend to include values that encode pointers, they are not limited thereto. Indeed, the techniques are more generally applicable to management of values in a multithreaded computation. For example, value recycling techniques may be exploited, in some cases, apart from dynamic storage allocation, to allow a multithreaded computation to avoid the classic ABA hazard.
-
Citations
81 Claims
-
1. A lock-free method of managing a set of values in a multithreaded computation the method comprising:
-
indicating an intention to use a particular one of the values; and
as a condition precedent to use of the particular value, determining that the indication was sufficient to prevent recycling of the particular value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30)
-
-
31. In a computational system, a method of avoiding an ABA hazard, the method comprising:
-
recording an intention to use value A;
using the value A only after the recording is safely completed; and
overwriting a value B with the value A only after all safely completed recording for the value A are cancelled. - View Dependent Claims (32, 33, 34)
-
-
35. In a computational system, a method of avoiding improperly dereferencing a pointer, the method comprising:
-
recording an intention to use a particular pointer value;
using the particular pointer value only after the recording is safely completed; and
recycling the particular pointer value only after all safely completed recordings therefor are cancelled. - View Dependent Claims (36, 37, 38, 39, 40, 41, 42, 43)
-
- 44. A dynamic-sized, non-blocking data structure encoded in a computer readable medium, wherein failure of any computational thread operating on the non blocking data structure prevents future reclamation of no more than a bounded number of storage blocks thereof.
- 53. One or more instruction sequences that, when executed, produce a multithreaded computation that, prior to use of a particular value, determines that a recording of an intent to use the particular value was sufficient to prevent recycling thereof the instruction sequences encoded in one or more computer readable media.
-
63. A method of managing dynamically allocated memory for a dynamic sized data structure, the method comprising:
-
in a multithreaded computation, allocating storage from, and returning freed storage to, the dynamically allocated memory, at least some of the allocated and returned storage employed in the dynamic sized data structure; and
continuing to return freed storage to the dynamically allocated memory despite failure of any thread of the computation. - View Dependent Claims (64, 65)
-
-
66. A computer program product-encoded in one or more computer readable media and including a mechanism for management of a value set, the mechanism comprising:
-
a first instruction sequence responsive to a first execution thread of a computation to announce a particular value, prior to use thereof by the first execution thread; and
a second instruction sequence responsive to the first execution thread to cancel the announcement and thereby mark the particular value as unsafe for use by the first execution thread; and
a third instruction sequence executable to recycle values, the recycling occurring for the particular value only if no sufficient announcement thereof remains uncancelled. - View Dependent Claims (67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77)
-
- 78. A computer readable encoding of a multithreaded computation wherein individual threads thereof employ an exit mechanism that allows the respective individual thread to exit without leaking values or resources associated therewith and without waiting for operation of another one of the threads, the exit mechanism handing off values for which a preuse announcement remains uncancelled.
Specification