Maintaining Processing Order While Permitting Parallelism
First Claim
Patent Images
1. A method for processing pieces of work in a plurality of stages, the method comprising:
- taking a lock associated with a first stage;
performing a task associated with the first stage on a first piece of work;
determining if a lock associated with a second stage is available;
if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the lock associated with the first stage, and performing a task associated with the second stage on the first piece of work; and
if the lock associated with the second stage is not available, storing the first piece of work in a queue associated with the second stage.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for maintaining processing order while permitting parallelism. Processing of a piece of work is divided into a plurality of stages. At each stage, a task advancing the work towards completion is performed. By performing processing as a sequence of tasks, processing can be done in parallel, with progress being made simultaneously on different pieces of work in different stages by a plurality of threads of execution.
-
Citations
48 Claims
-
1. A method for processing pieces of work in a plurality of stages, the method comprising:
-
taking a lock associated with a first stage; performing a task associated with the first stage on a first piece of work; determining if a lock associated with a second stage is available; if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the lock associated with the first stage, and performing a task associated with the second stage on the first piece of work; and if the lock associated with the second stage is not available, storing the first piece of work in a queue associated with the second stage. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for processing packets in a virtual switch connected to a plurality of virtual machines, the method comprising:
-
taking a lock associated with a first stage; performing a task associated with the first stage on a first packet; determining if a lock associated with a second stage is available; if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the lock associated with the first stage, and performing a task associated with the second stage on the first packet; and if the lock associated with the second stage is not available, storing the packet in a queue associated with the second stage. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A method for processing pieces of work in a plurality of stages, the method comprising:
-
taking a first lock associated with a first stage; performing a task associated with the first stage on a first piece of work; taking a second lock associated with the first stage; releasing the first lock associated with the first stage; determining if a lock associated with a second stage is available; if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the second lock associated with the first stage, and performing a task associated with the second stage on the first piece of work; and if the lock associated with the second stage is not available, storing the first piece of work in a queue associated with the second stage and releasing the second lock associated with the first stage.
-
-
24. A system for maintaining processing order while permitting parallelism, the system comprising:
-
a first queue; a first lock; a second lock; and a first thread of execution, the first thread of execution is configured to take the first lock, perform a first task on a first piece of work, determine if the second lock is available, and, if the second lock is available, take the second lock and perform a second task on the first piece of work, and, if the second lock is not available, store the first piece of work in the first queue. - View Dependent Claims (25)
-
-
26. A computer program product for processing pieces of work in a plurality of stages, the computer program product comprising a computer-readable medium containing computer program code for:
-
taking a lock associated with a first stage; performing a task associated with the first stage on a first piece of work; determining if a lock associated with a second stage is available; if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the lock associated with the first stage, and performing a task associated with the second stage on the first piece of work; and if the lock associated with the second stage is not available, storing the first piece of work in a queue associated with the second stage. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34, 35)
-
-
36. A computer program product for processing packets in a virtual switch connected to a plurality of virtual machines, the computer program product comprising a computer-readable medium containing computer program code for:
-
taking a lock associated with a first stage; performing a task associated with the first stage on a first packet; determining if a lock associated with a second stage is available; if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the lock associated with the first stage, and performing a task associated with the second stage on the first packet; and if the lock associated with the second stage is not available, storing the packet in a queue associated with the second stage. - View Dependent Claims (37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47)
-
-
48. A computer program product for processing pieces of work in a plurality of stages, the computer program product comprising a computer-readable medium containing computer program code for:
-
taking a first lock associated with a first stage; performing a task associated with the first stage on a first piece of work; taking a second lock associated with the first stage; releasing the first lock associated with the first stage; determining if a lock associated with a second stage is available; if the lock associated with the second stage is available, taking the lock associated with the second stage, releasing the second lock associated with the first stage, and performing a task associated with the second stage on the first piece of work; and if the lock associated with the second stage is not available, storing the first piece of work in a queue associated with the second stage and releasing the second lock associated with the first stage.
-
Specification