发明名称 Method for accessing a shared resource by the thread requesting the lock making the operations of a second thread visible in the correct order
摘要 The disclosed method for accessing a shared resource of a computerized system comprises a first thread running on the system, a first portion of said thread requesting a lock on the shared resource and directing the system to make the operations of a second thread visible in a correct order. The system then makes the operations of the second thread visible in a correct order. A second portion of the first thread is then run to determine whether the first thread has obtained the lock on the resource. The method may also store a lock request value in a memory variable which is accessible by both threads. Then perform a memory barrier operation which guarantees execution of the store operation before any other operation and as the next operation performing a system call which to make the operations of a second thread visible in a correct order. The method may also when performing the system call execute code to change protection of a page of memory of the system. The method may also have the second portion of the thread perform a load operation of a variable to determine whether the thread has obtained the lock on the resource.
申请公布号 GB2414830(A) 申请公布日期 2005.12.07
申请号 GB20050010965 申请日期 2005.05.31
申请人 * SUN MICROSYSTEMS, INC. 发明人 DAVID * DICE;HUI * HUANG;MINGYAO * YANG
分类号 G06F9/46;G06F13/10 主分类号 G06F9/46
代理机构 代理人
主权项
地址