US2007061805A1PendingUtilityA1

Method and apparatus for improving thread posting efficiency in a multiprocessor data processing system

Assignee: BRENNER LARRY BPriority: Sep 15, 2005Filed: Sep 15, 2005Published: Mar 15, 2007
Est. expirySep 15, 2025(expired)· nominal 20-yr term from priority
G06F 9/485
44
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A computer implemented method, a data processing system, and computer usable program code for improving thread posting efficiency in a multiprocessor data processing system are provided. Aspects of the present invention first receive a set of threads from an application. The aspects of the present invention then group the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups. The threads in each group in the plurality of groups are all last executed on a same processor. The aspects of the present invention then wake up the threads in the plurality of groups in any order.

Claims

exact text as granted — not AI-modified
1 . A computer implemented method for thread posting efficiency in a multiprocessor data processing system, the computer implemented method comprising: 
 receiving a set of threads from an application;    grouping the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups, wherein threads in each group in the plurality of groups are all last executed on a same processor; and    waking up the threads in a group in the plurality of groups prior to waking up the threads in another group in the plurality of groups.    
   
   
       2 . The computer implemented method of  claim 1 , wherein the grouping step comprises: 
 sorting each thread in the set of threads based on a processor in the plurality of processors that a particular thread last ran on to form a sorted set of threads; and    selecting, for each processor in the plurality of processors, a subset of threads from the set of sorted threads, wherein the subset of threads forms a group in the plurality of groups and is last executed on a particular processor.    
   
   
       3 . The computer implemented method of  claim 1 , wherein the waking up step comprises: 
 waking up a single thread within each group in the plurality of groups prior to waking up another thread in the each group of the plurality of groups.    
   
   
       4 . The computer implemented method of  claim 1 , wherein the waking up step comprises: 
 waking up all of the threads in the group in the plurality of groups prior to waking up all of the threads in the another group in the plurality of groups.    
   
   
       5 . The computer implemented method of  claim 2 , wherein the sorting step comprises: 
 allocating memory storage for a list header of a processor;    identifying link indices, wherein the link indices link the subset of threads for each processor; and    initializing a value of the list header.    
   
   
       6 . The computer implemented method of  claim 5 , wherein the sorting step comprises: 
 determining, for each thread in the set of threads, if the thread is valid and permission exists to wake up the thread;    if the thread is valid and permission exists to wake up the thread, determining a processor on which the thread is last ran; and    assigning a thread identifier of the thread to the list header for the processor on which the thread is last ran.    
   
   
       7 . The computer implemented method of  claim 6 , wherein the assigning step comprises: 
 preserving a current value of the list header for the processor by assigning the current value to a link index in the link indices associated with the thread.    
   
   
       8 . The computer implemented method of  claim 7 , wherein the waking up step comprises: 
 determining, for each processor in the plurality of processors, if a thread is present based on the list header;    if a thread is present, locking a run queue of the processor;    retrieving the thread; and    determining if a maximum number of threads for the processor is awakened.    
   
   
       9 . The computer implemented method of  claim 8 , wherein the waking up step further comprises: 
 if a maximum number of threads for the processor is awakened, unlocking the run queue of the processor; and    relocking the run queue of the processor.    
   
   
       10 . The computer implemented method of  claim 9 , wherein the waking up step further comprises: 
 if a maximum number of threads for the processor is not awakened, determining if the thread can be locked without delay;    if the thread cannot be locked without delay, unlocking the run queue of the processor;    locking the thread with delay;    relocking the run queue of the processor; and    waking up the thread.    
   
   
       11 . The computer implemented method of  claim 10 , wherein the waking up step further comprises: 
 if the thread is locked without delay, waking up the thread;    determining if additional threads are present in the processor;    if additional threads are absent in the processor, unlocking the run queue of the processor; and    copying out an error if additional processors are absent in the plurality of processors and if one of the subset of threads cannot be awakened.    
   
   
       12 . The computer implemented method of  claim 11 , wherein the waking up step further comprises: 
 determining if the thread is on a wrong run queue;    if the thread is on a wrong run queue, waking up the thread by unlocking the wrong run queue, locking a correct run queue, waking up the thread, unlocking the correct run queue, and relocking the wrong run queue.    
   
   
       13 . The computer implemented method of  claim 1 , wherein the waking up step further comprises: 
 waking up the threads in the group in the plurality of groups in a last-in-first-out order.    
   
   
       14 . A data processing system for improving thread posting efficiency, the data processing system comprising: 
 a bus,    a storage device, wherein the storage device contains computer usable code;    a communications unit connected to the bus; and    a processing unit comprising a plurality of processors connected to the bus, wherein the processing unit executes the computer usable code to receive a set of threads from an application; group the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups, wherein threads in each group in the plurality of groups are all last executed on a same processor; and wake up the threads in a group in the plurality of groups prior to waking up the threads in another groups in the plurality of groups.    
   
   
       15 . The data processing system of  claim 14 , wherein the processing unit, in executing the computer usable code to group the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups, executes the computer usable code to sort each thread in the set of threads based on a processor in the plurality of processors that a particular thread last ran on to form a sorted set of threads; and select, for each processor in the plurality of processors, a subset of threads from the set of sorted threads, wherein the subset of threads forms a group in the plurality of groups and is last executed on a particular processor.  
   
   
       16 . The data processing system of  claim 14 , wherein the processing unit, in executing the computer usable code to wake up the threads in a group in the plurality of groups prior to waking up the threads in another group in the plurality of groups, executes the computer usable code to wake up a single thread within each group in the plurality of groups prior to waking up another thread in the each group in the plurality of groups.  
   
   
       17 . The data processing system of  claim 14 , wherein the processing unit, in executing the computer usable code to wake up the threads in a group in the plurality of groups prior to waking up the threads in another group in the plurality of groups, executes the computer usable code to wake up all of the threads in the group in the plurality of groups prior to waking up all of the threads in the another group in the plurality of groups.  
   
   
       18 . A computer program product comprising: 
 a computer usable medium having computer usable program code for improving thread posting efficiency in a multiprocessor data processing system, said computer program product including:    computer usable program code for receiving a set of threads from an application;    computer usable program code for grouping the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups, wherein threads in each group in the plurality of groups are all last executed on a same processor; and    computer usable program code for waking up the threads in a group in the plurality of groups prior to waking up the threads in another group in the plurality of groups.    
   
   
       19 . The computer program product of  claim 18 , wherein the computer usable program code for grouping the set of threads with a plurality of processors based on a last execution of the set of threads on the plurality of processors to form a plurality of groups comprises: 
 computer usable program code for sorting each thread in the set of threads based on a processor in the plurality of processors that a particular thread last ran on to form a sorted set of threads; and    computer usable program code for selecting, for each processor in the plurality of processors, a subset of threads from the set of sorted threads, wherein the subset of threads forms a group in the plurality of groups and is last executed on a particular processor.    
   
   
       20 . The computer program product of  claim 19 , wherein the computer usable program code for waking up the threads in a group in the plurality of groups prior to waking up the threads in another group in the plurality of groups comprises: 
 computer usable program code for waking up a single thread within each group in the plurality of groups prior to waking up another thread in the each group of the plurality of groups.

Join the waitlist — get patent alerts

Track US2007061805A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.