PROTECTING SHARED RESOURCES USING SHARED MEMORY AND SOCKETS
First Claim
1. A method of protecting a shared resource in a computing system, comprising:
- storing, in shared memory accessible to at least a first thread and a second thread which execute concurrently in the computing system, a lock data structure for serializing access to the shared resource, the first thread executing under control of a first operating system hosted by the computing system and the second thread executing under control of a second operating system hosted by the computing system; and
upon detecting, by the first thread, that a lock provided by the lock data structure is already held, using a socket to block while waiting for the lock to be released.
1 Assignment
0 Petitions
Accused Products
Abstract
Shared memory and sockets are used to protect shared resources in an environment where multiple operating systems execute concurrently on the same hardware. Rather than using spinlocks for serializing access to the shared resources, when a thread is unable to acquire a shared resource because that resource is already held by another thread, the thread that was unable to acquire the resource creates a socket with which it will wait to be notified that the shared resource has been released. The sockets may be network sockets or in-memory sockets that are accessible across the multiple operating systems; if sockets are not available in a particular implementation, communication technology that provides analogous services between operating systems may be used instead. In an optional aspect, fault tolerance is provided to address socket failures, in which case one or more threads may fall back (at least temporarily) to using spinlocks. As another option, a locking service may execute on each operating system to provide a programming interface through which threads can invoke operations for holding and releasing the lock.
38 Citations
20 Claims
-
1. A method of protecting a shared resource in a computing system, comprising:
-
storing, in shared memory accessible to at least a first thread and a second thread which execute concurrently in the computing system, a lock data structure for serializing access to the shared resource, the first thread executing under control of a first operating system hosted by the computing system and the second thread executing under control of a second operating system hosted by the computing system; and upon detecting, by the first thread, that a lock provided by the lock data structure is already held, using a socket to block while waiting for the lock to be released. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for protecting shared resources in a computing system, comprising:
-
a computer comprising a processor; and instructions which are executable, using the processor, to implement functions comprising; storing, in shared memory accessible to at least a first thread and a second thread which execute concurrently in the computing system, a lock data structure for serializing access to one of the shared resources, the first thread executing under control of a first operating system hosted by the computing system and the second thread executing under control of a second operating system hosted by the computing system; and upon detecting, by the first thread, that a lock provided by the lock data structure is already held, using a socket to block while waiting for the lock to be released. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A computer program product for protecting shared resources in a computing system, the computer program product comprising:
a computer readable storage medium having computer readable program code embodied therein, the computer readable program code configured for; storing, in shared memory accessible to at least a first thread and a second thread which execute concurrently in the computing system, a lock data structure for serializing access to one of the shared resources, the first thread executing under control of a first operating system hosted by the computing system and the second thread executing under control of a second operating system hosted by the computing system; and upon detecting, by the first thread, that a lock provided by the lock data structure is already held, using a socket to block while waiting for the lock to be released. - View Dependent Claims (16, 17, 18, 19, 20)
Specification