Shared resources in a data processing apparatus for executing a plurality of threads
First Claim
1. A data processing apparatus configured to execute a plurality of threads, the data processing apparatus comprising:
- a general program counter to identify one instruction in a stream of instructions to be executed for at least a subset of the plurality of threads, wherein each thread in the subset has an associated thread program counter to identify one instruction in the stream of instructions,selector circuitry configured to select a selected thread of the subset of threads and to set the general program counter to the thread program counter associated with the selected thread; and
a processor configured to execute an instruction identified by the general program counter for one or more of the subset of threads including the selected thread,wherein the subset of threads is associated with at least one lock parameter for tracking which of the subset of threads has exclusive access to a shared resource;
wherein the processor is configured to modify the at least one lock parameter to indicate that a thread has gained exclusive access to the shared resource in response to a first instruction executed for that thread, and to modify the at least one lock parameter associated with the thread to indicate that the thread no longer has exclusive access to the shared resource in response to a second instruction executed for that thread; and
wherein the selector circuitry is configured to select the selected thread based on the at least one lock parameter.
1 Assignment
0 Petitions
Accused Products
Abstract
A data processing apparatus (100) executes threads and includes a general program counter (PC) (120) identifying an instruction to be executed for at least a subset of the threads. Each thread has a thread PC (184). The subset of threads has at least one lock parameter (188, 500-504) for tracking exclusive access to shared resources. In response to a first instruction executed for a thread, the processor (160) modifies the at least one lock parameter (188), (500-504) to indicate that the thread has gained exclusive access to the shared resource. In response to a second instruction, the processor modifies the at least one lock parameter (188, 500-504) to indicate that the thread no longer has exclusive access. A selector (110) selects one of the subset of threads based on the at least one lock parameter (188, 500-504) and sets the general PC (120) to the thread PC (184) of the selected thread.
12 Citations
27 Claims
-
1. A data processing apparatus configured to execute a plurality of threads, the data processing apparatus comprising:
-
a general program counter to identify one instruction in a stream of instructions to be executed for at least a subset of the plurality of threads, wherein each thread in the subset has an associated thread program counter to identify one instruction in the stream of instructions, selector circuitry configured to select a selected thread of the subset of threads and to set the general program counter to the thread program counter associated with the selected thread; and a processor configured to execute an instruction identified by the general program counter for one or more of the subset of threads including the selected thread, wherein the subset of threads is associated with at least one lock parameter for tracking which of the subset of threads has exclusive access to a shared resource; wherein the processor is configured to modify the at least one lock parameter to indicate that a thread has gained exclusive access to the shared resource in response to a first instruction executed for that thread, and to modify the at least one lock parameter associated with the thread to indicate that the thread no longer has exclusive access to the shared resource in response to a second instruction executed for that thread; and wherein the selector circuitry is configured to select the selected thread based on the at least one lock parameter. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
-
-
26. A data processing method for executing a stream of instructions for a subset of a plurality of threads, wherein each thread in the subset has an associated thread program counter for identifying one instruction in the stream of instructions, the data processing method comprising the steps:
-
selecting a selected thread of the subset of threads, and setting a general program counter to the thread program counter associated with the selected thread, wherein the general program counter identifies one instruction in a stream of instructions to be executed for the subset of threads; and executing an instruction identified by the general program counter for one or more of the subset of threads including the selected thread, wherein the subset of threads is associated with at least one lock parameter for tracking which of the subset of threads has exclusive access to a shared resource; wherein the at least one lock parameter is modified to indicate that a thread has gained exclusive access to the shared resource in response to a first instruction executed for that thread, and is modified to indicate that the thread no longer has exclusive access to the shared resource in response to a second instruction executed for that thread; and wherein the selected thread is selected based on the at least one lock parameter.
-
-
27. A data processing apparatus configured to execute a plurality of threads, the data processing apparatus comprising:
-
a general program counter means for identifying one instruction in a stream of instructions to be executed for at least a subset of the plurality of threads, wherein each thread in the subset has an associated thread program counter means for identifying one instruction in the stream of instructions, a selection means for selecting a selected thread of the subset of threads and for setting the general program counter means to the thread program counter means associated with the selected thread; and a processor means for executing an instruction identified by the general program counter means for one or more of the subset of threads including the selected thread, wherein the subset of threads is associated with at least one lock parameter for tracking which of the subset of threads has exclusive access to a shared resource; wherein the processor means is for modifying the at least one lock parameter to indicate that a thread has gained exclusive access to the shared resource in response to a first instruction executed for that thread, and for modifying the at least one lock parameter to indicate that the thread no longer has exclusive access to the shared resource in response to a second instruction executed for that thread; and wherein the selection means is for selecting the selected thread based on the at least one lock parameter.
-
Specification