The patent badge is an abbreviated version of the USPTO patent document. The patent badge does contain a link to the full patent document.

The patent badge is an abbreviated version of the USPTO patent document. The patent badge covers the following: Patent number, Date patent was issued, Date patent was filed, Title of the patent, Applicant, Inventor, Assignee, Attorney firm, Primary examiner, Assistant examiner, CPCs, and Abstract. The patent badge does contain a link to the full patent document (in Adobe Acrobat format, aka pdf). To download or print any patent click here.

Date of Patent:
Jul. 05, 2016

Filed:

Jul. 30, 2013
Applicant:

Microsoft Corporation, Redmond, WA (US);

Inventors:

Andrew D. Rogers, Bellevue, WA (US);

Neill M. Clift, Kirkland, WA (US);

Assignee:
Attorneys:
Primary Examiner:
Int. Cl.
CPC ...
G06F 9/46 (2006.01); G06F 9/50 (2006.01); G06F 9/52 (2006.01);
U.S. Cl.
CPC ...
G06F 9/50 (2013.01); G06F 9/526 (2013.01);
Abstract

A method of avoiding unnecessary context switching in a multithreaded environment. A thread of execution of a process waiting on a lock protecting access to a shared resource may wait for the lock to be released by executing in a loop, or 'spin'. The waiting thread may continuously check, in a user mode of an operating system, an indicator of whether the lock has been released. After a certain time period, the thread may stop spinning and enter a kernel mode of the operating system. Subsequently, before going to sleep which entails costly context switching, the thread may perform an additional check of the indicator to determine whether the lock has been released. If this is the case, the thread returns to user mode and the unnecessary context switching is avoided.


Find Patent Forward Citations

Loading…