Context switching with reader-writer locks
First Claim
Patent Images
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.
1 Assignment
0 Petitions
Accused Products
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.
13 Citations
11 Claims
-
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. - View Dependent Claims (2, 3, 4, 5)
-
-
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. - View Dependent Claims (7, 8, 10)
-
-
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. - View Dependent Claims (11)
-
Specification