发明名称 Lock control in multiple processor systems
摘要 A computer implemented method executing 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 method also provides locking and unlocking 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.
申请公布号 US8850441(B2) 申请公布日期 2014.09.30
申请号 US201313788308 申请日期 2013.03.07
申请人 International Business Machines Corporation 发明人 Allen Gerald Martyn Worsfold
分类号 G06F9/46;G06F9/52;G06F9/48 主分类号 G06F9/46
代理机构 代理人 Kalaitzis Parashos;Rolnik Robert C.;Mims David
主权项 1. A method of 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 method comprising: 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 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, delaying execution of the next thread for a predetermined time delay.
地址 Armonk NY US