摘要 |
Shared memory and sockets are used to protect shared resources where multiple operating systems execute concurrently on the same hardware. Rather than using spinlocks for serializing access, when a thread is unable to acquire a shared resource because that resource is already held by another thread, the thread 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, communication technology that provides analogous services between operating systems may be used instead. Optionally, fault tolerance is provided to address socket failures, in which case one or more threads may fall back (at least temporarily) to using spinlocks. A locking service may execute on each operating system to provide a programming interface through which threads can invoke lock operations.
|