Providing a wrapper around native synchronization objects
First Claim
1. A computer-readable storage medium whose contents implement in a computing system functions for accessing a synchronization mechanism, the functions comprising:
- a safe initialization function called by a thread to initialize the synchronization mechanism so that the synchronization mechanism can be used by any thread;
a safe acquisition function called by a thread to acquire the synchronization mechanism, in some cases after waiting for release of the synchronization mechanism by a thread that previously acquired the synchronization mechanism;
a safe release function called by a thread to release the synchronization mechanism after acquiring the synchronization mechanism; and
a safe deletion function called by a thread to delete the synchronization mechanism so that the synchronization mechanism can no longer be used by any thread,the safe acquisition function permitting calling threads to acquire or wait to acquire the synchronization mechanism only if the safe initialization function has been called more recently than the safe deletion function,the safe deletion function deferring deletion of the synchronization mechanism until any threads that previously acquired the synchronization mechanism release it and until any threads waiting for the synchronization mechanism resume execution.
2 Assignments
0 Petitions
Accused Products
Abstract
A facility for managing a synchronization mechanism that supports initialization, acquisition, release, and deletion operations is described. When a thread seeks to perform the acquisition operation, the facility permits performance of the acquisition operation only if the initialization operation has been performed more recently than the deletion operation. When a thread seeks to perform the deletion operation, the facility waits until any threads that are seeking to perform the acquisition operation or have performed the acquisition operation more recently than the release operation have performed the release operation before deleting the synchronization mechanism.
-
Citations
18 Claims
-
1. A computer-readable storage medium whose contents implement in a computing system functions for accessing a synchronization mechanism, the functions comprising:
-
a safe initialization function called by a thread to initialize the synchronization mechanism so that the synchronization mechanism can be used by any thread; a safe acquisition function called by a thread to acquire the synchronization mechanism, in some cases after waiting for release of the synchronization mechanism by a thread that previously acquired the synchronization mechanism; a safe release function called by a thread to release the synchronization mechanism after acquiring the synchronization mechanism; and a safe deletion function called by a thread to delete the synchronization mechanism so that the synchronization mechanism can no longer be used by any thread, the safe acquisition function permitting calling threads to acquire or wait to acquire the synchronization mechanism only if the safe initialization function has been called more recently than the safe deletion function, the safe deletion function deferring deletion of the synchronization mechanism until any threads that previously acquired the synchronization mechanism release it and until any threads waiting for the synchronization mechanism resume execution. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method in a computing system having a processor for managing a synchronization mechanism that supports a safe initialization function called by a thread to initialize the synchronization mechanism so that the synchronization mechanism can be used by any thread, a safe acquisition function called by a thread to acquire the synchronization mechanism—
- in some cases after waiting for release of the synchronization mechanism by a thread that previously acquired the synchronization mechanism, a safe release function called by a thread to release the synchronization mechanism after acquiring the synchronization mechanism, and a safe deletion function called by a thread to delete the synchronization mechanism so that the synchronization mechanism can no longer be used by any thread operations, comprising;
with the processor, when a thread calls the acquisition function, permitting the calling thread to acquire the synchronization mechanism only if the safe initialization function has been called more recently than the safe deletion function; and with the processor, when a thread calls the deletion function, waiting until any threads that previously acquired the synchronization mechanism release it and until any threads waiting for the synchronization mechanism resume execution before deleting the synchronization mechanism so that the synchronization mechanism can no longer be used by any thread. - View Dependent Claims (8, 9, 10, 11, 12, 13)
- in some cases after waiting for release of the synchronization mechanism by a thread that previously acquired the synchronization mechanism, a safe release function called by a thread to release the synchronization mechanism after acquiring the synchronization mechanism, and a safe deletion function called by a thread to delete the synchronization mechanism so that the synchronization mechanism can no longer be used by any thread operations, comprising;
-
14. A multithreaded computing system, comprising:
-
a processor; an operating system executing on the processor; a resource usable by one or more threads; a native synchronization mechanism implemented by the operating system for synchronizing access to the resource; and a synchronization mechanism wrapper through which threads access the native synchronization mechanism, wherein the native synchronization mechanism provides an initialization operation by which a thread can initialize the native synchronization mechanism for use by any thread, an acquisition operation by which a thread can acquire the native synchronization mechanism, a release operation by which a thread can release the synchronization mechanism after requiring synchronization mechanism, and a deletion operation by which a thread can disable the native synchronization mechanism from use by any thread, and wherein the synchronization mechanism wrapper prevents any thread from performing the acquisition operation unless the initialization operation has been performed more recently than the deletion operation, and wherein the synchronization mechanism wrapper prevents any thread from performing the deletion operation until any threads that previously performed the acquisition operation perform the release operation and until any threads waiting for the synchronization mechanism resume execution. - View Dependent Claims (15, 16, 17, 18)
-
Specification