Scheduling threads in multi-core systems
First Claim
Patent Images
1. A method to be executed at least in part in a computing device for scheduling threads in a multi-core processor system, the method comprising:
- receiving a thread to be scheduled for processing by the multi-core processor system;
determining whether the received thread has a fixed affinity for a particular core of the multi-core processor system;
assigning a sequence number to the received thread based on time of arrival of the thread when the thread is determined to not have a fixed affinity for the particular core and assigning a sequence number to the received thread based on time of arrival plus an offset when the thread is determined to have a fixed affinity;
placing the thread in a per-processor queue for the particular core when the thread is determined to have a fixed affinity for the particular core;
placing the thread in a global run queue for all available cores of the multi-core processor system when the thread is determined to not have a fixed affinity for the particular core; and
processing the threads from the global run queue and the per-processor queue according to the assigned sequence number.
2 Assignments
0 Petitions
Accused Products
Abstract
Scheduling of threads in a multi-core system is performed using per-processor queues for each core to hold threads with fixed affinity for each core. Cores are configured to pick the highest priority thread among the global run queue, which holds threads without affinity, and their respective per-processor queue. To select between two threads with same priority on both queues, the threads are assigned sequence numbers based on their time of arrival. The sequence numbers may be weighted for either queue to prioritize one over the other.
53 Citations
15 Claims
-
1. A method to be executed at least in part in a computing device for scheduling threads in a multi-core processor system, the method comprising:
-
receiving a thread to be scheduled for processing by the multi-core processor system; determining whether the received thread has a fixed affinity for a particular core of the multi-core processor system; assigning a sequence number to the received thread based on time of arrival of the thread when the thread is determined to not have a fixed affinity for the particular core and assigning a sequence number to the received thread based on time of arrival plus an offset when the thread is determined to have a fixed affinity; placing the thread in a per-processor queue for the particular core when the thread is determined to have a fixed affinity for the particular core; placing the thread in a global run queue for all available cores of the multi-core processor system when the thread is determined to not have a fixed affinity for the particular core; and processing the threads from the global run queue and the per-processor queue according to the assigned sequence number. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for scheduling threads in a multi-core processor environment, the system comprising:
-
a memory; a multi-core processor coupled to the memory, comprising a plurality of distinct processing cores, the multi-core processor configured to; receive a thread to be to be scheduled for processing by the multi-core processor; determine whether the received thread has a fixed affinity for a particular core of the multi-core processor; assign a sequence number to the received thread based on time of arrival of the thread when the thread is determined to not have a fixed affinity for the particular core and assigning a sequence number to the received thread based on time of arrival plus an offset when the thread is determined to have a fixed affinity; place the thread in a per-processor queue for the particular core when the thread has a fixed affinity for the particular core of the multi-core processor; and place the thread in a global run queue for all available cores of the plurality of cores of the multi-core processor when the thread is determined to not have a fixed affinity for the particular core; and processing the threads from the global run queue and the per-processor queue according to the assigned sequence number. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A computer-readable storage medium with instructions encoded thereon for scheduling threads in a multi-core processor system, the instructions comprising:
-
receiving a thread to be scheduled for processing by the multi-core processor system; determining whether the received thread has a fixed affinity for a particular core of the multi-core processor system; assigning a sequence number to the received thread based on time of arrival of the thread when the thread is determined to not have a fixed affinity for the particular core and assigning a sequence number to the received thread based on time of arrival plus an offset when the thread is determined to have a fixed affinity; placing the thread in a per-processor queue for the particular core when the thread is determined to have a fixed affinity for the particular core; placing the thread in a global run queue for all available cores based on the when the thread is determined to not have a fixed affinity for the particular core; and processing the threads from the global run queue and the per-processor queue according to assigned sequence number. - View Dependent Claims (14, 15)
-
Specification