Patentable/Patents/US-9798585
US-9798585

Context switching with reader-writer locks

PublishedOctober 24, 2017
Assigneenot available in USPTO data we have
Inventorsnot available in USPTO data we have
Technical Abstract

A method for scheduling threads for a software application. The method may include obtaining a thread from a thread queue. The thread may be a program segment of a software process. The method may include determining that the thread is for reading data from a program resource. The method may include, in response to determining that the thread is for reading the program resource, designating an exclusion lock on the program resource to various reader threads. The reader threads may include the thread from the thread queue. The method may include retrieving, by the reader threads, data from the program resource.

Patent Claims
11 claims

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

1

1. A method for scheduling threads for a software application, comprising: terminating, to a first writer thread, an exclusion lock on a program resource; activating, in response to terminating the exclusion lock to the writer thread, a plurality of reader threads and a second writer thread from suspension in a thread queue, wherein the thread queue comprises a plurality of suspended threads; designating the exclusion lock on the program resource to the plurality of reader threads; inserting the second writer thread in a writer queue, wherein the second writer thread automatically obtains the exclusion lock in response to a termination of the exclusion lock to the plurality of reader threads; and retrieving, by the plurality of reader threads, first data from the program resource.

2

2. The method of claim 1 , further comprising: obtaining a suspended thread; sorting the plurality of suspended threads within the thread queue according to a plurality of priority scores associated with the plurality of suspended threads, wherein the suspended thread is inserted into a location in the thread queue based on a priority score of the suspended thread.

3

3. The method of claim 1 , wherein the plurality of reader threads retrieve the first data from the program resource substantially simultaneously.

4

4. The method of claim 1 , wherein the plurality of reader threads are located at consecutive positions in the thread queue.

5

5. The method of claim 1 , wherein the program resource is a portion of memory configured to be accessed by the software process.

6

6. A system for scheduling threads for a software application, comprising: a processor; a memory executable by the processor, the memory comprising functionality for: terminating, to a first writer thread, an exclusion lock on a program resource; activating, in response to terminating the exclusion lock to the writer thread, a plurality of reader threads and a second writer thread from suspension in a thread queue, wherein the thread queue comprises a plurality of suspended threads; designating the exclusion lock on the program resource to the plurality of reader threads; inserting the second writer thread in a writer queue, wherein the second writer threads automatically obtains the exclusion lock in response to a termination of the exclusion lock to the plurality of reader threads; and retrieving, by the plurality of reader threads, first data from the program resource.

7

7. The system of claim 6 , wherein the memory further comprises functionality for: obtaining a suspended thread; sorting the plurality of suspended threads within the thread queue according to a plurality of priority scores associated with the plurality of suspended threads, wherein the second suspended thread is inserted into a location in the thread queue based on a priority score of the second suspended thread.

8

8. The system of claim 6 , wherein the plurality of reader threads retrieve the first data from the program resource substantially simultaneously.

9

9. A non-transitory computer readable medium storing instructions for scheduling threads for a software application, the instructions comprising functionality for: terminating, to a first writer thread, an exclusion lock on a program resource; activating, in response to terminating the exclusion lock to the writer thread, a plurality of reader threads and a second writer thread from suspension in a thread queue, wherein the thread queue comprises a plurality of suspended threads; designating the exclusion lock on the program resource to the plurality of reader threads; inserting the second writer thread in the writer queue, wherein the second writer thread automatically obtains the exclusion lock in response to termination of the exclusion lock to the plurality of reader threads; and retrieving, by the plurality of reader threads, first data from the program resource.

10

10. The non-transitory computer readable medium of claim 6 , wherein the instructions further comprise functionality for: obtaining a suspended thread; sorting the plurality of suspended threads within the thread queue according to a plurality of priority scores associated with the plurality of suspended threads, wherein the second suspended thread is inserted into a location in the thread queue based on a priority score of the second suspended thread.

11

11. The non-transitory computer readable medium of claim 9 , wherein the plurality of reader threads retrieve the first data from the program resource substantially simultaneously.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

May 19, 2015

Publication Date

October 24, 2017

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. “Context switching with reader-writer locks” (US-9798585). https://patentable.app/patents/US-9798585

© 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.