Adaptive handling of priority inversions using transactions
First Claim
1. A computer-implemented method, comprising:
- receiving, at a resource manager of an operating system of a data processing system, a request from a first process to acquire an exclusive lock for accessing a resource of the data processing system, the first process having a first priority;
increasing by a priority manager of the operating system a second priority of a second process to reduce total lock hold time of the second process, the second process currently in possession of the exclusive lock for performing a transactional operation with the resource, wherein the second priority was lower than the first priority of the first process, wherein the first process and the second process are running within the data processing system;
notifying the second process by the resource manager to indicate that another process is waiting for the exclusive lock, including setting a flag to a predetermined value in a predetermined memory location accessible by the second process, wherein the second process is to periodically poll the predetermined memory location to determine whether another process is waiting for the exclusive lock, wherein in response to the notification, the second process can decide whether to complete or roll back the transactional operation and to release the exclusive lock thereafter;
receiving, by the resource manager, an indication that the second process has released the lock in response to the notification; and
allocating the lock to the first process to allow the first process to access the resource.
1 Assignment
0 Petitions
Accused Products
Abstract
An operating system of a data processing system receives a request from a first process to acquire an exclusive lock for accessing a resource of the data processing system. A second priority of a second process is increased to reduce total execution time. The second process is currently in possession of the exclusive lock for performing a transactional operation with the resource. The second priority was lower than a first priority of the first process. The operating system notifies the second process to indicate that another process is waiting for the exclusive lock to allow the second process to complete or roll back the transactional operation and to release the exclusive lock thereafter.
-
Citations
18 Claims
-
1. A computer-implemented method, comprising:
-
receiving, at a resource manager of an operating system of a data processing system, a request from a first process to acquire an exclusive lock for accessing a resource of the data processing system, the first process having a first priority; increasing by a priority manager of the operating system a second priority of a second process to reduce total lock hold time of the second process, the second process currently in possession of the exclusive lock for performing a transactional operation with the resource, wherein the second priority was lower than the first priority of the first process, wherein the first process and the second process are running within the data processing system; notifying the second process by the resource manager to indicate that another process is waiting for the exclusive lock, including setting a flag to a predetermined value in a predetermined memory location accessible by the second process, wherein the second process is to periodically poll the predetermined memory location to determine whether another process is waiting for the exclusive lock, wherein in response to the notification, the second process can decide whether to complete or roll back the transactional operation and to release the exclusive lock thereafter; receiving, by the resource manager, an indication that the second process has released the lock in response to the notification; and allocating the lock to the first process to allow the first process to access the resource. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A non-transitory machine-readable medium having instructions stored therein, which when executed by a processor, cause the processor to perform a method, the method comprising:
-
receiving, at a resource manager of an operating system of a data processing system, a request from a first process to acquire an exclusive lock for accessing a resource of the data processing system, the first process having a first priority; increasing by a priority manager of the operating system a second priority of a second process to reduce total lock hold time of the second process, the second process currently in possession of the exclusive lock for performing a transactional operation with the resource, wherein the second priority was lower than the first priority of the first process, wherein the first process and the second process are running within the data processing system; notifying the second process by the resource manager to indicate that another process is waiting for the exclusive, including setting a flag to a predetermined value in a predetermined memory location accessible by the second process, wherein the second process is to periodically poll the predetermined memory location to determine whether another process is waiting for the exclusive lock, wherein in response to the notification, the second process can decide whether to complete or roll back the transactional operation and to release the exclusive lock thereafter; receiving, by the resource manager, an indication that the second process has released the lock in response to the notification; and allocating the lock to the first process to allow the first process to access the resource. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A data processing system, comprising:
-
a processor; and a memory storing instructions, which when executed from the memory, cause the processor to receive at a resource manager of an operating system a request from a first process to acquire an exclusive lock for accessing a resource of the data processing system, the first process having a first priority, increase by a priority manager a second priority of a second process to reduce total lock hold time, the second process currently in possession of the exclusive lock for performing a transactional operation with the resource, wherein the second priority was lower than the first priority of the first process, wherein the first process and the second process are running within the data processing system, notify the second process by the resource manager to indicate that another process is waiting for the exclusive lock, including setting a flag to a predetermined value in a predetermined memory location accessible by the second process, wherein the second process is to periodically poll the predetermined memory location to determine whether another process is waiting for the exclusive lock, wherein in response to the second message, the second process can decide whether to complete or roll back the transactional operation and to release the exclusive lock thereafter, receive, by the resource manager, an indication that the second process has released the lock in response to the notification, and allocate the lock to the first process to allow the first process to access the resource. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification