Method and system for deadline inheritance for resource synchronization
First Claim
1. A method to prevent locking of a resource for a specific task comprising:
- queuing a first task in a queue of tasks to be executed by at least one processor of a system, the first task having a first priority of execution time determined based at least in part on a first execution delay value associated with the first task;
queuing a second task in the queue of tasks, the second task having a second priority of execution time determined based at least in part on a second execution delay value associated with the second task, the second priority of execution time being earlier than the first priority of execution time;
queueing a third task in the queue of tasks, the third task having a third priority of execution time determined based at least in part on a third execution delay value associated with the third task, the third priority of execution time being earlier than the first priority of execution time and later than the second priority of execution time, wherein the time when the at least one processor of the system will execute each task is based at least in part on its respective priority of execution time, the respective priority of execution time of each task supplanting a priority associated with each task;
executing the first task by the at least one processor of the system, wherein the execution of the first task locks a resource on the system;
executing the second task by the at least one processor of the system, wherein the execution of the second task requires the resource on the system locked by the first task;
determining that the resource required for execution of the second task is locked by the first task;
responsive to determining that the resource required for execution of the second task is locked by the first task, promoting the first task having the first priority of execution time to a new priority of execution time at least as early as the second priority of execution time of the second task;
re-inserting the second task into the queue to wait for the first task to unlock the resource, the re-inserted second task having the second priority of execution time; and
continuing execution of the first task having the new priority of execution time by the at least one processor of the system, whereby promoting the first task having the first priority of execution time to the new priority of execution time at least as early as the second priority of execution time of the second task inhibits the third task having the third priority of execution time from executing and locking the resource prior to execution of the re-inserted second task having the second priority of execution time by the at least one processor of the system.
9 Assignments
0 Petitions
Accused Products
Abstract
Example embodiments of the present invention provide a method, a system, and a computer program product for managing tasks in a system. The method comprises running a first task on a system, wherein the first task has a first priority of execution time and the execution of which first task locks a resource on the system, and running a second task on the system, wherein the second task has a second priority of execution time earlier than the first priority of execution time of the first task and the execution of which second task requires the resource on the system locked by the first task. The system then may promote the first task having the later first priority of execution time to a new priority of execution time at least as early as the second priority of execution time of the second task and resume execution of the first task having the later first priority of execution time.
9 Citations
21 Claims
-
1. A method to prevent locking of a resource for a specific task comprising:
-
queuing a first task in a queue of tasks to be executed by at least one processor of a system, the first task having a first priority of execution time determined based at least in part on a first execution delay value associated with the first task; queuing a second task in the queue of tasks, the second task having a second priority of execution time determined based at least in part on a second execution delay value associated with the second task, the second priority of execution time being earlier than the first priority of execution time; queueing a third task in the queue of tasks, the third task having a third priority of execution time determined based at least in part on a third execution delay value associated with the third task, the third priority of execution time being earlier than the first priority of execution time and later than the second priority of execution time, wherein the time when the at least one processor of the system will execute each task is based at least in part on its respective priority of execution time, the respective priority of execution time of each task supplanting a priority associated with each task; executing the first task by the at least one processor of the system, wherein the execution of the first task locks a resource on the system; executing the second task by the at least one processor of the system, wherein the execution of the second task requires the resource on the system locked by the first task; determining that the resource required for execution of the second task is locked by the first task; responsive to determining that the resource required for execution of the second task is locked by the first task, promoting the first task having the first priority of execution time to a new priority of execution time at least as early as the second priority of execution time of the second task; re-inserting the second task into the queue to wait for the first task to unlock the resource, the re-inserted second task having the second priority of execution time; and continuing execution of the first task having the new priority of execution time by the at least one processor of the system, whereby promoting the first task having the first priority of execution time to the new priority of execution time at least as early as the second priority of execution time of the second task inhibits the third task having the third priority of execution time from executing and locking the resource prior to execution of the re-inserted second task having the second priority of execution time by the at least one processor of the system. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising:
-
memory; at least one processor; and computer program code that, when executed on the at least one processor, provides a task scheduler process configured to perform the operations of; queuing a first task in a queue of tasks to be executed by at least one processor of the system, the first task having a first priority of execution time determined based at least in part on a first execution delay value associated with the first task; queuing a second task in the queue of tasks, the second task having a second priority of execution time determined based at least in part on a second execution delay value associated with the second task, the second priority of execution time being earlier than the first priority of execution time; queueing a third task in the queue of tasks, the third task having a third priority of execution time determined based at least in part on a third execution delay value associated with the third task, the third priority of execution time being earlier than the first priority of execution time and later than the second priority of execution time, wherein the time when the at least one processor of the system will execute each task is based at least in part on its respective priority of execution time, the respective priority of execution time of each task supplanting a priority associated with each task; executing the first task by the at least one processor of the system, wherein the execution of the first task locks a resource on the system; executing the second task by the at least one processor of the system, wherein the execution of the second task requires the resource on the system locked by the first task; determining that the resource required for execution of the second task is locked by the first task; responsive to determining that the resource required for execution of the second task is locked by the first task, promoting the first task having the first priority of execution time to a new priority of execution time at least as early as the second priority of execution time of the second task; re-inserting the second task into the queue to wait for the first task to unlock the resource, the re-inserted second task having the second priority of execution time; and continuing execution of the first task having the new priority of execution time by the at least one processor of the system, whereby promoting the first task having the first priority of execution time to the new priority of execution time at least as early as the second priority of execution time of the second task inhibits the third task having the third priority of execution time from executing and locking the resource prior to execution of the re-inserted second task having the second priority of execution time by the at least one processor of the system. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A tangible non-transitory media having computer executable code encoded thereon that when executed by at least one processor of a system causes the at least one processor to provide a task scheduler process to manage the execution of tasks in a queue of tasks to be executed by the at least one processor of the system, the computer executable code comprising:
-
computer program code for queuing a first task in the queue of tasks, the first task having a first priority of execution time determined based at least in part on a first execution delay value associated with the first task; computer program code for queuing a second task in the queue of tasks, the second task having a second priority of execution time determined based at least in part on a second execution delay value associated with the second task, the second priority of execution time being earlier than the first priority of execution time; computer program code for queueing a third task in the queue of tasks, the third task having a third priority of execution time determined based at least in part on a third execution delay value associated with the third task, the third priority of execution time being earlier than the first priority of execution time and later than the second priority of execution time, wherein the time when the at least one processor of the system will execute each task is based at least in part on its respective priority of execution time, the respective priority of execution time of each task supplanting a priority associated with each task; computer program code for executing the first task by the at least one processor of the system, wherein the execution of the first task locks a resource on the system; computer program code for executing the second task by the at least one processor of the system, wherein the execution of the second task requires the resource on the system locked by the first task; computer program code for determining that the resource required for execution of the second task is locked by the first task; computer program code for promoting the first task having the first priority of execution time to a new priority of execution time at least as early as the second priority of execution time of the second task responsive to determining that the resource required for execution of the second task is locked by the first task; computer program code for re-inserting the second task into the queue to wait for the first task to unlock the resource, the re-inserted second task having the second priority of execution time; and computer program code for continuing execution of the first task having the new priority of execution time by the at least one processor of the system, whereby promoting the first task having the first priority of execution time to the new priority of execution time at least as early as the second priority of execution time of the second task inhibits the third task having the third priority of execution time from executing and locking the resource prior to execution of the re-inserted second task having the second priority of execution time by the at least one processor of the system. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification