Multiple core real-time task execution
AssigneeMicrosoft Technology Licensing, LLC
InventorsChih-Yung (Paul) Wang, Yongguang Zhang, Kun Tan, 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 method comprising:
- performing a real-time task execution using a first thread on a first core of a multi-core processor;
- acquiring, by a second thread, a thread affinity for the second thread to execute the real-time task on a second core of the multi-core processor;
- storing a switch object in a queue that is accessible to the first thread and the second thread;
- writing, by the second thread, a callee ready indicator to a variable in the switch object;
- receiving, by the first thread, the callee ready indicator from the queue;
- writing, by the first thread, a caller ready indicator to the variable in the switch object;
- determining, by the second thread, that the caller ready indicator is in the variable;
- and
- transferring performance of the real-time task from the first thread to the second thread after the second thread is executing on the second core to perform the real-time task based at least in part on the determining.
One or more computer storage media storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform acts comprising:
- performing a real-time task execution using a first thread on a first core of a multi-core processor;
- acquiring, by a second thread, a thread affinity for the second thread to execute the real-time task on a second core of the multi-core processor;
- storing a switch object in a queue that is accessible to the first thread and the second thread;
- writing, by the second thread, a callee ready indicator to a variable in the switch object;
- receiving, by the first thread, the callee ready indicator from the queue;
- writing, by the first thread, a caller ready indicator to the variable in the switch object;
- determining, by the second thread, that the caller ready indicator is in the variable;
- and
- transferring performance of the real-time task from the first thread to the second thread after the second thread is executing on the second core to perform the real-time task based at least in part on the determining.
A computing device comprising:
- a multi-core processor;
- and
- a memory that includes a plurality of computer-executable components, the 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 acquires 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 and stores a switch object, wherein:
- the second thread writes a callee ready indicator to a variable in the switch object based at least in part on the second thread acquiring the thread affinity;
- the first thread receives the callee ready indicator from the queue, and writes a caller ready indicator to the variable in the switch object;
- and
- the second thread determines that the caller ready indicator is in the variable;
- and
- a dispatcher that initiates the second thread to take over performance of the real-time task on the second core while the first thread is performing the real-time task,
- wherein performance of the real-time task is transferred from the first thread to the second thread after the second thread is executing on the second core to perform the real-time task.
Dependencies are inferred from the claim text.