Patent ID: 7945911

Claim:
A consensus barrier synchronization method for multithreaded processes, comprising: apportioning a plurality of subtasks of a task among N threads, where N is an integer greater than one, and wherein each thread is apportioned one or more of the subtasks; initializing a state for each of the N threads in a thread state array to indicate that each of the N threads is dormant; initializing an active thread count for the task to N, wherein the active thread count acts as a consensus barrier for the N threads; a scheduler process starting one or more of the N threads, wherein at least one of the N threads is not started; each of the one or more started threads changing its corresponding state in the thread state array to indicate that the respective thread is active, wherein the state in the thread state array of the at least one thread that was not started remains dormant; each started thread performing work as indicated by the one or more subtasks which are apportioned to the respective thread, wherein a dormant thread does not perform work; at least one of the started threads performing work as indicated by the subtasks which are apportioned to the at least one dormant thread; and one of the started threads decrementing the active thread count on behalf of a dormant thread to indicate that the dormant thread has checked in at the consensus barrier, wherein said decrementing comprises: determining, by one of the started threads that is a stealing thread, that the dormant thread has no more subtasks to be performed, and in response to said determining, the stealing thread decrementing the active thread count to indicate that the dormant thread has checked in at the consensus barrier.