Small barrier with local spinning
First Claim
1. A computer-implemented system for thread management, comprising:
- a processor; and
a memory comprising computer-readable instructions executable by the processor, the instructions including;
a barrier component for spinning threads at corresponding local memory locations when meeting a process barrier according to a barrier object by invoking a stack component as the threads arrive at the process barrier, wherein the barrier object is defined as a bit vector that functions as a counter that specifies a total number of threads required to rendezvous at the process barrier to trigger release of the threads when no threads are waiting at the barrier, and as a pointer to a stack block list when at least one thread is waiting at the process barrier; and
the stack component for creating and linking the stack blocks of the stack block list, wherein each stack block is associated with a respective one of the threads waiting at the barrier and is a tuple having at least a field related to the total number of threads.
2 Assignments
0 Petitions
Accused Products
Abstract
A barrier with local spinning. The barrier is described as a barrier object having a bit vector embedded as a pointer. If the vector bit is zero, the object functions as a counter; if the vector bit is one, the object operates as a pointer to a stack. The object includes the total number of threads required to rendezvous at the barrier to trigger release of the threads. The object points to a stack block list that describes each thread that has arrived at the barrier. Arriving at the barrier involves reading the top stack block, pushing onto the list a stack block for the thread that just arrived, decrementing the thread count, and spinning on corresponding local memory locations or timing out and blocking. When the last thread arrives at the barrier, the barrier is reset and all threads at the barrier are awakened for the start of the next process.
17 Citations
17 Claims
-
1. A computer-implemented system for thread management, comprising:
-
a processor; and a memory comprising computer-readable instructions executable by the processor, the instructions including; a barrier component for spinning threads at corresponding local memory locations when meeting a process barrier according to a barrier object by invoking a stack component as the threads arrive at the process barrier, wherein the barrier object is defined as a bit vector that functions as a counter that specifies a total number of threads required to rendezvous at the process barrier to trigger release of the threads when no threads are waiting at the barrier, and as a pointer to a stack block list when at least one thread is waiting at the process barrier; and the stack component for creating and linking the stack blocks of the stack block list, wherein each stack block is associated with a respective one of the threads waiting at the barrier and is a tuple having at least a field related to the total number of threads. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-implemented method of managing threads, comprising acts of:
-
processing threads received at a process barrier according to a barrier object by creating and linking blocks of a block list as the threads arrive at the process barrier, the barrier object defined as a bit vector that functions as a counter that specifies a total number of threads required to rendezvous at the process barrier to trigger release of the threads when no threads are waiting at the process barrier, and as a pointer to the block list when at least one thread is waiting at the process barrier, wherein each block of the block list corresponds to a respective thread that is waiting at the process barrier; spinning a waiting thread at a local memory location specified in the corresponding stack block based on arrival of a next thread relative to the barrier; and utilizing a processor to execute instructions stored in memory to perform at least one of the acts of processing or controlling. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A computer-implemented system, comprising:
-
computer-implemented means for processing threads received at a process barrier according to a barrier object by creating and linking blocks of a block list as the threads arrive at the process barrier, the barrier object defined as a bit vector that functions as a counter that specifies a total number of threads required to rendezvous at the process barrier to trigger release of the threads when no threads are waiting at the process barrier, and as a pointer to the block list when at least one thread is waiting at the process barrier, wherein each block of the block list corresponds to a respective thread that is waiting at the process barrier; computer-implemented means for spinning a waiting thread at a local memory location specified in the corresponding stack block based on arrival of a next thread relative to the barrier; and a processor configured to execute computer-executable instructions associated with the computer-implemented means for processing and spinning.
-
Specification