Multiple core real-time task execution
AssigneeMicrosoft Technology Licensing, LLC
InventorsChih-Yung Wang, Kun Tan, Yongguang Zhang, Qiufeng Yin
Life of this patent
Estimating the term…
Abstract
A real-time task may initially be performed by a first thread that is executing on a first core of a multi-core processor. A second thread may be initiated to take over the performance of the real-time task on a second core of the multi-core processor while the first thread is performing the real-time task. The performance of the real-time tasks is then transferred from the first thread to the second thread with the execution of the second thread on the second core to perform the real-time task.
Claims20
A computer storage media storing computer-executable instructions that, when executed, cause one or more processors to perform acts comprising:
- performing a real-time task execution using a first thread on a current core of a multi-core processor;
- acquiring, by the first thread and based at least in part on a predetermined event, a thread affinity for a second thread that executes on an alternative core of the multi-core processor,
- storing, by the first thread, the thread affinity in a queue that is accessible to the first thread and the second thread;
- obtaining, by the second thread, the thread affinity from the queue;
- initiating the second thread to take over performance of the real-time task on the alternative core of the multi-core processor while the first thread is performing the real-time task on the current core;
- and
- transferring, in order to free up the current core, performance of the real-time task from the first thread to the second thread after the second thread is executing on the alternative core to perform the real-time task.
A computer-implemented method, comprising:
- performing a real-time task by executing a first thread on a current core of a multi-core processor;
- acquiring, by the first thread and based at least in part on a predetermined event, a thread affinity for a second thread to take over performance of the real-time task on an alternative core in order to free up the current core;
- storing, by the first thread, the thread affinity in a queue that is accessible to both the first thread and the second thread;
- obtaining, by the second thread, the thread affinity from the queue;
- initiating the second thread to take over performance of the real-time task on the alternative core while the first thread is performing the real-time task on the current core:
- transferring, in order to free up the current core, performance of the real-time task from the first thread to the second thread after the second thread is executing on the alternative core to perform the real-time task.
A computing device, comprising:
- a multi-core processor;
- and
- a memory that includes a plurality of computer-executable components, comprising:
- a scheduler that schedules a real-time task to be performed by threads executing on multiple cores of the multi-core processor, the threads including a first thread that executes on a first core of the multiple cores to perform the real-time task, and a second thread that obtains a thread affinity for taking over performance of the real-time task on a second core of the multiple cores;
- a queue that is accessible to the first thread and the second thread, wherein the first thread acquires, based at least in part on a predetermined event, the thread affinity and stores the thread affinity in the queue, and wherein the second thread obtains the thread affinity from the queue;
- and
- a dispatcher that initiates the second thread to take over performance of the real-time task on the second core of the multi-core processor while the first thread is performing the real-time task;
- wherein, in order to free up the current core, performance of the real-time task is transferred from the first thread to the second thread after the second thread is executing on the alternative core to perform the real-time task.
Dependencies are inferred from the claim text.