Lock control in multiple processor systems
First Claim
1. A system comprising a plurality of processors and one or more storage devices, the system arranged to execute a plurality of tasks, each task comprising one or more threads and each task being assigned a priority from 1 to a whole number greater than 1, each thread of a task being assigned a same priority as a corresponding task and each thread being executed by a processor of the system, the system providing lock and unlock functions arranged to lock and unlock data stored by a storage device in response to a request from a requesting thread, the system further arranged to:
- maintain a queue of threads that require access to locked data;
maintain an array comprising, for each priority, at least one of a duration and a throughput information for threads of the priority, whereby threads having the priority occupy a common position in the array;
set a Boolean wait flag for the priority in the array according to a predefined algorithm calculated from the at least one of the duration and the throughput information in the array, wherein throughput information is determined, in part by using a number of tasks terminated for a time interval;
responsive to a thread releasing a lock on data, determine that the next thread that requires a lock on the released data is to be executed on a processor for the thread that released the lock;
responsive to determining that the next thread that requires the lock on the released data is to be executed on the processor for the thread that released the lock, determine that the Boolean wait flag is set in the array for a priority of a next thread; and
responsive to a determination that the Boolean wait flag is set in the array for a priority of a next thread, delay execution of the next thread for a predetermined time delay.
1 Assignment
0 Petitions
Accused Products
Abstract
A computer system comprising a plurality of processors and one or more storage devices. The system is arranged to execute a plurality of tasks, each task comprising threads and each task being assigned a priority from 1 to a whole number greater than 1, each thread of a task assigned the same priority as the task and each thread being executed by a processor. The system also provides lock and unlock functions arranged to lock and unlock data stored by a storage device responsive to such a request from a thread. A method of operating the system comprises maintaining a queue of threads that require access to locked data, maintaining an array comprising, for each priority, duration and/or throughput information for threads of the priority, setting a wait flag for a priority in the array according to a predefined algorithm calculated from the duration and/or throughput information in the array.
-
Citations
13 Claims
-
1. A system comprising a plurality of processors and one or more storage devices, the system arranged to execute a plurality of tasks, each task comprising one or more threads and each task being assigned a priority from 1 to a whole number greater than 1, each thread of a task being assigned a same priority as a corresponding task and each thread being executed by a processor of the system, the system providing lock and unlock functions arranged to lock and unlock data stored by a storage device in response to a request from a requesting thread, the system further arranged to:
-
maintain a queue of threads that require access to locked data; maintain an array comprising, for each priority, at least one of a duration and a throughput information for threads of the priority, whereby threads having the priority occupy a common position in the array; set a Boolean wait flag for the priority in the array according to a predefined algorithm calculated from the at least one of the duration and the throughput information in the array, wherein throughput information is determined, in part by using a number of tasks terminated for a time interval; responsive to a thread releasing a lock on data, determine that the next thread that requires a lock on the released data is to be executed on a processor for the thread that released the lock; responsive to determining that the next thread that requires the lock on the released data is to be executed on the processor for the thread that released the lock, determine that the Boolean wait flag is set in the array for a priority of a next thread; and responsive to a determination that the Boolean wait flag is set in the array for a priority of a next thread, delay execution of the next thread for a predetermined time delay. - View Dependent Claims (2, 3, 4, 5, 6, 13)
-
-
7. A computer program product for operating a system comprising a plurality of processors and one or more storage devices, the system arranged to execute a plurality of tasks, each task comprising one or more threads and each task being assigned a priority from 1 to a whole number greater than 1, each thread of a task being assigned a same priority as a corresponding task and each thread being executed by a processor of the system, the system providing lock and unlock functions arranged to lock and unlock data stored by a storage device in response to a request from a requesting thread, the computer program product comprising a computer-readable hardware storage device comprising instructions for:
-
maintaining a queue of threads that require access to locked data; maintaining an array comprising, for each priority, at least one of a duration and a throughput information for threads of the priority, whereby threads having the priority occupy a common position in the array; setting a Boolean wait flag for the priority in the array according to a predefined algorithm calculated from the at least one of the duration and the throughput information in the array, wherein throughput information is determined, in part, by using a number of tasks terminated for a time interval; responsive to a thread releasing a lock on data, determining that the next thread that requires a lock on the released data is to be executed on a processor for the thread that released the lock; responsive to determining that the next thread that requires the lock on the released data is to be executed on the processor for the thread that released the lock, determining that the Boolean wait flag is set in the array for the a priority of the next thread; and responsive to a determination that the Boolean wait flag is set in the array for the priority of the next thread, delaying execution of the next thread for a predetermined time delay. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification