LOCK BASED MOVING OF THREADS IN A SHARED PROCESSOR PARTITIONING ENVIRONMENT
First Claim
1. A computer implemented method for assigning software threads to a first virtual processor of a data processing system having a plurality of virtual processors, the method comprising:
- assigning a first software thread to the first virtual processor;
detecting cooperation between a first software thread and a second software thread with respect to a lock associated with a resource of the data processing system;
responsive to detecting cooperation, moving the second software thread to the first virtual processor;
determining that a first optimization flag is set for the first software thread and that a second optimization flag is set for the second software thread; and
performing both the detecting, and the moving based on a determination that the first optimization flag is set and the second optimization flag is set.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides a computer implemented method and apparatus to assign software threads to a common virtual processor of a data processing system having multiple virtual processors. A data processing system detects cooperation between a first thread and a second thread with respect to a lock associated with a resource of the data processing system. Responsive to detecting cooperation, the data processing system assigns the first thread to the common virtual processor. The data processing system moves the second thread to the common virtual processor, whereby a sleep time associated with the lock experienced by the first thread and the second thread is reduced below a sleep time experienced prior to the detecting cooperation step.
-
Citations
5 Claims
-
1. A computer implemented method for assigning software threads to a first virtual processor of a data processing system having a plurality of virtual processors, the method comprising:
-
assigning a first software thread to the first virtual processor; detecting cooperation between a first software thread and a second software thread with respect to a lock associated with a resource of the data processing system; responsive to detecting cooperation, moving the second software thread to the first virtual processor; determining that a first optimization flag is set for the first software thread and that a second optimization flag is set for the second software thread; and performing both the detecting, and the moving based on a determination that the first optimization flag is set and the second optimization flag is set.
-
-
2. A computer implemented method for assigning software threads to a first virtual processor of a data processing system having a plurality of virtual processors, the method comprising:
-
assigning a first software thread to the first virtual processor; detecting cooperation between a first software thread and a second software thread with respect to a lock associated with a resource of the data processing system, wherein detecting cooperation further comprises; detecting that the second software thread targeted the first software thread for wakeup; and determining whether a targeted virtual processor has a consumption below a compatible limit, wherein the targeted virtual processor is a virtual processor assigned to the second software thread; and responsive to detecting cooperation, moving the second software thread to the first virtual processor.
-
-
3. A computer program product for assigning software threads to a first virtual processor of a data processing system having a plurality of virtual processors, the computer program product comprising:
-
computer usable program code for assigning the first thread to the first virtual processor responsive to detecting cooperation; computer usable program code for detecting cooperation between a first thread and a second thread with respect to a lock associated with a resource of a the data processing system; computer usable program code for moving the second thread to the first virtual processor in response to computer usable program code for detecting cooperation; computer usable program code for determining that a first optimization flag is set for the first thread and that a second optimization flag is set for the second thread; and computer usable program code for performing the computer usable program code for detecting, and the computer usable code for assigning executes based on a determination that the first optimization flag is set and the second optimization flag is set.
-
-
4. A computer program product for assigning software threads to a first virtual processor of a data processing system having a plurality of virtual processors, the computer program product comprising:
-
computer usable program code for assigning the first thread to the first virtual processor responsive to detecting cooperation; computer usable program code for detecting cooperation between a first thread and a second thread with respect to a lock associated with a resource of a the data processing system, wherein the computer usable program code for detecting cooperation further comprises; computer usable program code for detecting that the second thread targeted the first thread for wakeup; and computer usable program code for determining whether a targeted virtual processor has a consumption below a compatible limit, wherein the targeted virtual processor is a virtual processor assigned to the second software thread; and computer usable program code for moving the second thread to the first virtual processor in response to computer usable program code for detecting cooperation.
-
-
5. A data processing system comprising:
-
a bus; a storage device connected to the bus, wherein computer usable code is located in the storage device; a communication unit connected to the bus; a processing unit connected to the bus, wherein the processing unit executes the computer usable code for assigning software threads to a first virtual processor of a data processing system having a plurality of virtual processors, the processing unit further executes the computer usable code to assign the first thread to the first virtual processor;
detect cooperation between a first thread and a second thread with respect to a lock associated with a resource of a the data processing system;
responsive to detecting cooperation, and move the second thread to the first virtual processor, wherein in executing computer usable code to detect cooperation, the processing unit executes computer usable code to detect that the second thread targeted the first thread for wakeup and to determine whether a targeted virtual processor has a consumption below a compatible limit the virtual processor assigned to the second thread.
-
Specification