Method and apparatus for controlling the processing priority between multiple threads in a multithreaded processor
First Claim
1. A method of controlling a processing priority assigned alternately to a first thread and a second thread in a multithreaded processor, the processing priority being used to prevent deadlock and livelock problems between the first thread and the second thread, the method comprising:
- setting a first duration and a second duration to a first initial period of time and a second initial period of time, respectively, the first duration representing a period of priority during which the first thread is assigned the processing priority and the second duration representing a period of priority during which the processing priority is assigned to the second thread; and
assigning alternately the processing priority to the first thread for the first duration or to the second thread for the second duration, wherein assigning alternately the processing priority to either one of the first thread or the second thread includes setting a thread priority signal to one of a first value indicating that the first thread has the processing priority over the second thread or a second value indicating that the second thread has the processing priority over the first thread;
wherein the first duration is dynamically adjusted each time the processing priority is assigned to the first thread based on whether the first thread has made progress, and the second duration is dynamically adjusted each time the processing priority is assigned to the second thread based on whether the second thread has made progess.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides a method and apparatus for controlling a processing priority assigned alternately to a first thread and a second thread in a multithreaded processor to prevent deadlock and livelock problems between the first thread and the second thread. In one embodiment, the processing priority is initially assigned to the first thread for a first duration. It is then determined whether the first duration has expired in a given processing cycle. If the first duration has expired, the processing priority is assigned to the second thread for a second duration.
-
Citations
12 Claims
-
1. A method of controlling a processing priority assigned alternately to a first thread and a second thread in a multithreaded processor, the processing priority being used to prevent deadlock and livelock problems between the first thread and the second thread, the method comprising:
-
setting a first duration and a second duration to a first initial period of time and a second initial period of time, respectively, the first duration representing a period of priority during which the first thread is assigned the processing priority and the second duration representing a period of priority during which the processing priority is assigned to the second thread; and
assigning alternately the processing priority to the first thread for the first duration or to the second thread for the second duration, wherein assigning alternately the processing priority to either one of the first thread or the second thread includes setting a thread priority signal to one of a first value indicating that the first thread has the processing priority over the second thread or a second value indicating that the second thread has the processing priority over the first thread;
wherein the first duration is dynamically adjusted each time the processing priority is assigned to the first thread based on whether the first thread has made progress, and the second duration is dynamically adjusted each time the processing priority is assigned to the second thread based on whether the second thread has made progess. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An apparatus for arbitrating a processing priority assigned alternately to a first thread and a second thread in a multithreaded processor, the apparatus comprising:
-
logic to set a first duration and a second duration to a first initial period of time and a second initial period of time, respectively, the first duration representing a period of priority during which the first thread is assigned the processing priority and the second duration representing a period of priority during which the processing priority is assigned to the second thread;
logic to alternately assign the processing priority to either one of the first thread for the first duration or to the second thread for the second duration; and
logic to set a thread priority signal to one of a first value indicating that the first thread has the processing priority over the second thread or a second value indicating that the second thread has the processing priority over the first thread;
wherein the first duration is dynamically adjusted each time the processing priority is assigned to the first thread based on whether the first thread has made progress, and the second duration is dynamically adjusted each time the processing priority is assigned to the second thread based on whether the second thread has made progress. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification