IP Library Granted Patent US 9,286,116
Granted Patent B2
US 9,286,116 · App. 13/543,231 · Granted Mar 15, 2016

Multiple core real-time task execution

Inventors: Chih-Yung Wang (Beijing, CN); Kun Tan (Beijing, CN); Yongguang Zhang (Beijing, CN); Qiufeng Yin (Beijing, CN)
Assignee: Microsoft Technology Licensing, LLC
G06F9/4856G06F9/524
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,286,116
App. No.
13/543,231
Granted
Mar 15, 2016
Kind
B2
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.

Claims (41)

1. 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.

2. The computer storage media of claim 1 , the acts further comprising performing a non real-time task by executing the first thread on the current core or another core of the multi-core processor following the transferring.

3. The computer storage media of claim 1 , wherein the initiating includes changing the second thread from a wait state to an executing state.

4. The computer storage media of claim 1 , wherein the first thread acquires the thread affinity by requesting an allocation of the alternative core.

5. The computer storage media of claim 1 , wherein the obtaining the thread affinity includes obtaining the thread affinity from a switch object in the queue that is accessible to the first thread and the second thread.

6. The computer storage media of claim 1 , wherein the initiating includes requesting an allocation of the alternative core using the second thread following an elapse of a predetermined time interval.

7. The computer storage media of claim 1 , wherein the alternative core is allocated for the performance of the real-time task on a round robin basis, a fair usage basis, a prioritized basis, or a random basis.

8. The computer storage media of claim 1 , wherein the transferring includes:

sending a thread ready indicator from the second thread to the first thread upon the second thread obtaining the thread affinity and being executed on the alternative core;

providing an additional thread ready indicator from the first thread to the second thread and placing the first thread in a wait state upon the first thread receiving the thread ready indicator; and

performing the real-time task in the second thread on the alternative core of the multi-core processor.

9. 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.

10. The computer-implemented method of claim 9 , further comprising executing an additional thread on the current core to perform a non real-time task after the second thread begins executing the real-time task on the alternative core.

11. The computer-implemented method of claim 9 , further comprising preventing, for at least a predetermined time period, the current core from executing an additional thread that performs another real-time task after the first thread terminates execution on the current core to enter the wait state.

12. The computer-implemented method of claim 9 , further comprising passing a thread ready indicator and an additional thread ready indicator between the first thread and the second thread using a variable in a memory space that is accessible to both the first thread and the second thread.

13. The computer-implemented method of claim 9 , wherein the alternative core is an available core of the multi-core processor that is allocated to the second thread on a round robin basis, a fair usage basis, a prioritized basis, or a random basis.

14. The computer-implemented method of claim 9 , wherein the acquiring includes using the second thread to initiate an allocation request for the alternative core following an elapse of a predetermined time interval.

15. 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.

16. The computing device of claim 15 , wherein the queue stores a switch object that tracks the thread affinity.

17. The computing device of claim 15 , wherein the first thread is to terminate execution on the first core upon transfer of the performance of the real-time task to the second core.

18. The computing device of claim 17 , further comprising a dampen mechanism that prevents the first core from executing a thread that performs another real-time task for a predetermined time period after the first thread terminates execution on the first core.

19. The computer storage media of claim 1 , wherein the predetermined event comprises a predetermined time interval.

20. The computer-implemented method of claim 9 , wherein the predetermined event comprises a predetermined time interval.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034544/0541 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 6, 2012
From: WANG, CHIH-YUNG; TAN, KUN; ZHANG, YONGGUANG; YIN, QIUFENG
To: MICROSOFT CORPORATION
Reel/Frame 028501/0325 →
Continuity (1)
Related Publication 20140013330A1 · Jan 9, 2014