8607239

Lock mechanism to reduce waiting of threads to access a shared resource by selectively granting access to a thread before an enqueued highest priority thread

PublishedDecember 10, 2013
Assigneenot available in USPTO data we have
Technical Abstract

Patent Claims
18 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. In association with a plurality of processors including two or more processors that each provides one of a set of specified threads to access a shared resource, wherein the shared resource can only be accessed by one thread at a given time, a locking mechanism enables a first one of the set of specified threads to access the shared resource while each of the other specified threads is retained in a waiting queue, and a second one of the specified threads occupies a position of highest priority in the queue, a method comprising the steps of: identifying a time period between a time when the first specified thread releases access to the shared resource, and a later time when the second specified thread becomes enabled to access the shared resource; responsive to an additional thread that is not one of the specified threads being provided by a processor to access the shared resource during the identified time period, determining whether a first prespecified criterion pertaining to the specified threads retained in said queue has been met, said first prespecified criterion is that the number of threads retained in said queue during said identified time period is greater than a number which is determined from a specified relationship of the number of threads in the queue to the number of processors in said configuration of processors; responsive to said first criterion being met, determining whether a second prespecified criterion has been met, wherein said second criterion is that the number of specified threads in said queue has not decreased since a specified prior time; and responsive to said second criterion being met before said second specified thread acquires said lock, enabling said additional thread to access the shared resource before the second specified thread accesses the shared resource.

2

2. The method of claim 1 , wherein: responsive to either or both of the first prespecified criterion or the second prespecified criterion not being met, placing said additional thread into said queue.

3

3. The method of claim 1 , wherein: said first prespecified criterion is that the number of threads retained in said queue during said identified time period is greater than one.

4

4. The method of claim 1 , wherein: said locking mechanism comprises a handoff lock mechanism that provides a lock, wherein the lock is sequentially acquired by different threads, and a thread becomes enabled to access the shared resource upon acquiring said lock.

5

5. The method of claim 4 , wherein: said second criterion is that the number of specified threads in said queue has not decreased since the last time the lock was acquired by a thread.

6

6. The method of claim 5 , wherein: a first counter is continually updated to show the current number of waiting threads in said queue at a given time, a second counter is continually updated to show the number of waiting threads each time the lock is acquired by a thread, and the contents of said first and second counters are selectively compared with each other to determine whether said second criterion has been met.

7

7. The method of claim 1 , wherein: each processor of said configuration comprises a virtual processor.

8

8. The method of claim 1 , wherein: each processor of said configuration comprises a real processor.

9

9. In association with a plurality of processors including two or more processors that each provides a specified thread to access a shared resource, wherein the shared resource can only be accessed by one thread at a given time, a locking mechanism enables a first one of the specified threads to access the shared resource while each of the other specified threads is retained in a waiting queue, and a second one of the specified threads occupies a position of highest priority in the queue, a computer program product executable in a non-transitory computer readable storage medium comprising: instructions for identifying a time period between a time when the first specified thread releases access to the shared resource, and a later time when the second specified thread becomes enabled to access the shared resource; instructions for responsive to an additional thread that is not one of the specified threads being provided by a processor to access the shared resource during the identified time period, for determining whether a first prespecified criterion pertaining to the specified threads retained in said queue has been met, said first prespecified criterion is that the number of threads retained in said queue during said identified time period is greater than a number which is determined from a specified relationship of the number of threads in the queue to the number of processors in said configuration of processors; instructions for responsive to said first criterion being met, for determining whether a second prespecified criterion has been met, wherein said second criterion is that the number of specified threads in said queue has not decreased since a specified prior time; and instructions for responsive to said second criterion being met before said second specified thread acquires said lock, for enabling said additional thread to access the shared resource before the second specified thread accesses the shared resource.

10

10. The computer program product of claim 9 , wherein: responsive to deciding not to enable said additional thread to access the shared resource before the second specified thread, said additional thread is placed into said queue.

11

11. The computer program product of claim 9 , wherein: said first prespecified criterion is that the number of threads retained in said queue during said identified time period is greater than one.

12

12. The computer program product of claim 9 , wherein: said locking mechanism comprises a handoff lock mechanism that provides a lock, wherein the lock is sequentially acquired by different threads, and a thread becomes enabled to access the shared resource upon acquiring said lock.

13

13. The computer program product of claim 12 , wherein: said second criterion is that the number of specified threads in said queue has not decreased since the last time the lock was acquired by a thread.

14

14. In association with a plurality of processors including two or more processors that each provides a specified thread to access a shared resource, wherein the shared resource can only be accessed by one thread at a given time, a locking mechanism enables a first one of the specified threads to access the shared resource while each of the other specified threads is retained in a waiting queue, and a second one of the specified threads occupies a position of highest priority in the queue, a computer comprising: a memory having computer usable instructions encoded thereon; a bus connecting the memory to a processor; and a processor wherein the processor executes the computer usable instructions: to identify a time period between a time when the first specified thread releases access to the shared resource, and a later time when the second specified thread becomes enabled to access the shared resource; responsive to an additional thread that is not one of the specified threads being provided by a processor to access the shared resource during the identified time period, to determine whether a first prespecified criterion pertaining to the specified threads retained in said queue has been met, said first prespecified criterion is that the number of threads retained in said queue during said identified time period is greater than a number which is determined from a specified relationship of the number of threads in the queue to the number of processors in said configuration of processors; responsive to said first criterion being met, to determine whether a second prespecified criterion has been met, wherein said second criterion is that the number of specified threads in said queue has not decreased since a specified prior time; and responsive to said second criterion being met before said second specified thread acquires said lock, to enable said additional thread to access the shared resource before the second specified thread accesses the shared resource.

15

15. The apparatus of claim 14 , wherein: responsive to deciding not to enable said additional thread to access the shared resource before the second specified thread, said additional thread is placed into said queue.

16

16. The apparatus of claim 14 , wherein: said first prespecified criterion is that the number of threads retained in said queue during said identified time period is greater than one.

17

17. The apparatus of claim 14 , wherein: said locking mechanism comprises a handoff lock mechanism that provides a lock, wherein the lock is sequentially acquired by different threads, and a thread becomes enabled to access the shared resource upon acquiring said lock.

18

18. The apparatus of claim 17 , wherein: said second criterion is that the number of specified threads in said queue has not decreased since the last time the lock was acquired by a thread.

Patent Metadata

Filing Date

Unknown

Publication Date

December 10, 2013

Inventors

Vaijayanthimala K. Anand
David A. Hepkin
Dirk Michel
Bret R. Olszewski

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “Lock mechanism to reduce waiting of threads to access a shared resource by selectively granting access to a thread before an enqueued highest priority thread” (8607239). https://patentable.app/patents/8607239

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.