Patent ID: 8544020
Filing Date: 2013-09-24
Classification: G06F

Abstract:
1. A method of preempting the execution of a thread, including: receiving at a processor a first indication that a preemption of a first thread is desired in order to execute a second thread; in response to receiving the first indication, waiting for the first thread to reach a thread safe point, the thread safe point being a point in code at which if the first thread were to stop at the thread safe point, an operation that a third thread may want to perform on the first thread can be performed, wherein the first thread, the second thread and the third thread are different threads; in the event that the first thread reaches a thread safe point, context switching the first thread out at the thread safe point and context switching the second thread in; in the event that the first thread has not reached a thread safe point and it is detected that a second indication has been received, in response to the detection, preemptively context switching the first thread out and context switching the second thread in; and in the case of a single processor system, in the event that a fourth thread requests that all other threads be at a safe point, and each of the other threads has already entered a thread safe point, begin executing the fourth thread immediately.