Blocking local sense synchronization barrier
First Claim
Patent Images
1. A method comprising:
- concurrently executing software threads on parallel processors;
synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; and
providing a variable that is to be changed within the synchronization barrier method, and read to determine when software threads should be released, wherein said variable is a local sense variable that is strictly local to the synchronization barrier method and neither a global variable nor a processor private variable, and wherein said variable is known within a block of code associated with the synchronization barrier method, but inaccessible to code outside the block.
2 Assignments
0 Petitions
Accused Products
Abstract
A blocking local sense synchronization barrier is provided. The local sense variable is not processor private or global, but truly local to the synchronization barrier function. Safe deletion is provided by making sure the last operation a thread performs on a barrier is a write. Just before returning, threads increment a field that indicates the count of threads that have left the barrier. Blocking is supported such that threads spin for some interval, and when they decide to block, examine and set (if not already set) the indication of whether a thread is blocking that is to be examined by the last thread to arrive at the barrier to determine whether to set an event to release blocking threads.
34 Citations
18 Claims
-
1. A method comprising:
-
concurrently executing software threads on parallel processors; synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; and providing a variable that is to be changed within the synchronization barrier method, and read to determine when software threads should be released, wherein said variable is a local sense variable that is strictly local to the synchronization barrier method and neither a global variable nor a processor private variable, and wherein said variable is known within a block of code associated with the synchronization barrier method, but inaccessible to code outside the block. - View Dependent Claims (2, 3)
-
-
4. A method comprising:
-
concurrently executing software threads on parallel processors; synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; and ensuring a last operation each thread performs before returning from the synchronization barrier method is a write operation on a count variable within said synchronization barrier method which indicates a number of threads that have left the synchronization barrier; and reclaiming the synchronization barrier when said count variable indicates that all threads have left the synchronization barrier, wherein the count variable is known within a block of code associated with the synchronization barrier method, but inaccessible to code outside the block. - View Dependent Claims (5, 6, 7, 8)
-
-
9. A method comprising:
-
concurrently executing software threads on parallel processors; synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; providing a variable that is to be changed within the synchronization barrier method, and examined to determine when software threads should be released, wherein said variable is a local sense variable that is strictly local to the synchronization barrier method and neither a global variable nor a processor private variable; providing an indication of whether a thread is blocking, which is used to determine whether a thread is blocking, wherein the indication of whether a thread is blocking is created only at a time when a thread decides to block; when a last thread arrives at the synchronization barrier, resetting a previous event; releasing spinning threads waiting for the last thread to arrive at the synchronization barrier by changing the local sense variable; examining the indication of whether a thread is blocking to determine whether a thread is blocking; and setting a current event to release threads that are blocking while waiting for the last thread to arrive, if indicated to do so by the examination of the indication of whether a thread is blocking.
-
-
10. A computer readable storage medium having computer-executable instructions stored thereon, wherein the computer executable instructions are executable by a computer to perform the steps of:
-
concurrently executing software threads on parallel processors; synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; and providing a variable that is to be changed within the synchronization barrier method, and read to determine when software threads should be released, wherein said variable is a local sense variable that is strictly local to the synchronization barrier method and neither a global variable nor a processor private variable, and wherein said variable is known within a block of code associated with the synchronization barrier method, but inaccessible to code outside the block. - View Dependent Claims (11, 12)
-
-
13. A computer readable storage medium having computer-executable instructions stored thereon, wherein the computer executable instructions are executable by a computer for performing the steps of:
-
concurrently executing software threads on parallel processors; synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; ensuring a last operation each thread performs before returning from the synchronization barrier method is a write operation on a count variable within said synchronization barrier method which indicates a number of threads that have left the synchronization barrier; and reclaiming the synchronization barrier when said count variable indicates that all threads have left the synchronization barrier, wherein the count variable is known within a block of code associated with the synchronization barrier method, but inaccessible to code outside the block. - View Dependent Claims (14, 15, 16, 17)
-
-
18. A computer readable storage medium having computer-executable instructions stored thereon, wherein the computer executable instructions are executable by a computer to perform method the steps of:
-
concurrently executing software threads on parallel processors; synchronizing the concurrently executing software threads via a synchronization barrier implemented via a synchronization barrier method having a property that no thread of the concurrently executing software threads can return from a call before all threads of the concurrently executing software threads have entered it; providing a variable that is to be changed within the synchronization barrier method, and examined to determine when software threads should be released, wherein said variable is a local sense variable that is strictly local to the synchronization barrier method and neither a global variable nor a processor private variable; providing an indication of whether a thread is blocking, which is used to determine whether a thread is blocking, wherein the indication of whether a thread is blocking is created only at a time when a thread decides to block; when a last thread arrives at the synchronization barrier, resetting a previous event releasing spinning threads waiting for the last thread to arrive at the synchronization barrier by changing the local sense variable; examining the indication of whether a thread is blocking to determine whether a thread is blocking; and setting a current event to release threads that are blocking while waiting for the last thread to arrive, if indicated to do so by the examination of the indication of whether a thread is blocking.
-
Specification