摘要 |
Access to a variable (x) from a thread (A) is granted whenever (1) the thread (A) sets an exclusion flag during use in order to access the variable (x). Whenever a thread (b) acquires the exclusion flag in order to access the variable (x), access to the variable (x) is prohibited because the flag has already been changed during use. The thread (B) (2) repeatedly acquires the exclusion flag until access to the variable (x) is granted, (3) counts the number of attempts each time an attempt to access is made, and (4) stores the number of attempts in a spin lock counter. (5) An OS detects the value in the spin lock counter at fixed timing. (6) The OS determines whether or not the value in the spin lock counter is equal to or greater than a predetermined number. When the value in the spin lock counter is equal to or greater than the predetermined number, the OS changes an exclusion scheme flag to trylock, and (7) stops the thread (B), whereby attempt to access from the thread (B) is prohibited. |
申请人 |
FUJITSU LIMITED;SUZUKI, TAKAHISA;YAMASHITA, KOICHIRO;YAMAUCHI, HIROMASA;KURIHARA, KOJI;OTOMO, TOSHIYA;ODATE, NAOKI |
发明人 |
SUZUKI, TAKAHISA;YAMASHITA, KOICHIRO;YAMAUCHI, HIROMASA;KURIHARA, KOJI;OTOMO, TOSHIYA;ODATE, NAOKI |