发明名称 Preventing unnecessary context switching by employing an indicator associated with a lock on a resource
摘要 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.
申请公布号 US8510738(B2) 申请公布日期 2013.08.13
申请号 US20090544376 申请日期 2009.08.20
申请人 ROGERS ANDREW D.;CLIFT NEILL M.;MICROSOFT CORPORATION 发明人 ROGERS ANDREW D.;CLIFT NEILL M.
分类号 G06F9/46 主分类号 G06F9/46
代理机构 代理人
主权项
地址