Synchronization mechanism and method for synchronizing multiple threads with a single thread
First Claim
Patent Images
1. A system comprising:
- a shared resource;
multiple processors arranged to access said shared resource; and
an operating system configured to allow said multiple processors to perform work on said shared resource concurrently while supporting state changes or updates of said shared resources, said operating system comprising a synchronization algorithm for synchronizing multiple worker threads of operation with a single thread so as to achieve mutual exclusion between multiple worker threads performing work on said shared resource and a single update thread updating or changing the state of said shared resource without requiring serialization of all threads such that an update or change of the state of the shared resource may be made by the single update thread only when none of the multiple worker threads are processing work on the shared resource, wherein the multiple worker threads are able to perform work on the shared resource concurrently.
1 Assignment
0 Petitions
Accused Products
Abstract
A host system is provided with a shared resource (such as work queues and completion queues); multiple processors arranged to access the shared resource; and an operating system arranged to allow multiple processors to perform work on the shared resource concurrently while supporting updates of the shared resource. Such an operating system may comprise a synchronization algorithm for synchronizing multiple threads of operation with a single thread so as to achieve mutual exclusion between multiple threads performing work on the shared resource and a single thread updating or changing the state of the shared resource without requiring serialization of all threads.
74 Citations
21 Claims
-
1. A system comprising:
-
a shared resource; multiple processors arranged to access said shared resource; and an operating system configured to allow said multiple processors to perform work on said shared resource concurrently while supporting state changes or updates of said shared resources, said operating system comprising a synchronization algorithm for synchronizing multiple worker threads of operation with a single thread so as to achieve mutual exclusion between multiple worker threads performing work on said shared resource and a single update thread updating or changing the state of said shared resource without requiring serialization of all threads such that an update or change of the state of the shared resource may be made by the single update thread only when none of the multiple worker threads are processing work on the shared resource, wherein the multiple worker threads are able to perform work on the shared resource concurrently. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A network, comprising:
-
a switched fabric; remote systems attached to said switched fabric; and a host system comprising multiple processors;
a host-fabric adapter provided to interface with said switched fabric and included work queues each configured to send and receive message data from a single remote system, via said switched fabric; and
an operating system configured to allow said multiple processors to perform work on said work queues concurrently while supporting state changes of said work queues, said operating system comprising a synchronization algorithm for synchronizing multiple worker threads of operation with a single update thread so as to achieve mutual exclusion between multiple worker threads performing work on said work queues and a single update thread changing the state of said work queues without requiring serialization of all threads such that an update or change of the state of the work queues may be made by the single update thread only when none of the multiple worker threads are processing work on the work queues, wherein the multiple worker threads are able to perform work on the shared resource concurrently. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A process of synchronizing an update thread which updates a list of work queues with multiple worker threads which operate on items in the list of work queues in a multi-processor system, comprising:
-
allowing a group of worker threads to concurrently access the list of work queues to process I/O operations in exclusion of an update thread, when states of the work queues are not changing; incrementing a count of threads processing I/O operations each time a worker thread is running, while decrementing the count of threads processing I/O operations each time a worker thread is done processing I/O operations; when the count of threads reaches a designated value indicating that no worker threads are running, allowing an update thread to access and update the list of work queues in exclusion of new worker threads from processing I/O operations; and after the list of work queues is updated, allowing new worker threads to perform I/O operations until all worker threads are done processing I/O operations.
-
-
21. A computer-readable storage medium that stores computer-executable instructions for synchronizing an update thread which updates a list of work queues with a group of threads which operate on items in the list of work queues in a multi-processor system, said computer-executable instructions causing said multi-processor system to:
-
permit a group of worker threads to concurrently access the list of work queues to process I/O operations in exclusion of an update thread, when states of the work queues are not changing; increment a count of threads processing I/O operations each time a worker thread is running, while decrementing the count of threads processing I/O operations each time a worker thread is done processing I/O operations; permit a single update thread to access and update the list of work queues in exclusion of new worker threads from processing I/O operations, when the count of threads reaches a designated value indicating that no worker threads are running; and after the list of work queues is updated, permit new worker threads to perform I/O operations until all worker threads are done processing I/O operations.
-
Specification