摘要 |
<p>The present invention is a system and method for facilitating a global safepoint operation in a multithreaded computer system. According to an embodiment of the present invention, each thread keeps track of its safepoint regions by maintaining a variable (a flag) which indicates a state, such as whether the current region of the thread is safe, unsafe, or transitional. In this manner, it can be determined whether a thread is currently in a safepoint region without suspending the thread. When a thread is currently in a safepoint region, the thread can continue to operate while a global safepoint operation, such as garbage-collection is being performed. When the thread begins to transition out of the safe region, it moves into a transitional region. The transitional region automatically blocks the transition into the non-safe region to assure that the safepoint operation occurs in a safe region. <IMAGE></p> |