Interruptible thread synchronization method and apparatus
First Claim
Patent Images
1. An interruptible thread synchronization method for efficiently accessing an object, the method comprising:
- controlling an exclusive access to an object by threads, using a monitor; and
interrupting a first one of the threads that are on standby for the monitor;
wherein the first one of the threads is determined by sequentially waking up at least two of the threads that are on standby for the monitor, checking each of the at least two of the threads for a condition, andwhen a checked one of the at least two threads meets the condition, selecting the checked one of the at least two threads meeting the condition as the first one of the threads, and placing the checked remaining ones of the at least two threads back on standby,wherein the selected thread is completely released from the monitor when the selected thread fails to acquire the monitor.
1 Assignment
0 Petitions
Accused Products
Abstract
An interruptible thread synchronization method and apparatus are provided. The interruptible thread synchronization method includes controlling mutually exclusive access to an object by one or more threads using a monitor, and interrupting a first thread that is on standby for the monitor. The interruptible thread synchronization method and apparatus allows for access and control of an object by one or more threads.
13 Citations
19 Claims
-
1. An interruptible thread synchronization method for efficiently accessing an object, the method comprising:
-
controlling an exclusive access to an object by threads, using a monitor; and interrupting a first one of the threads that are on standby for the monitor; wherein the first one of the threads is determined by sequentially waking up at least two of the threads that are on standby for the monitor, checking each of the at least two of the threads for a condition, and when a checked one of the at least two threads meets the condition, selecting the checked one of the at least two threads meeting the condition as the first one of the threads, and placing the checked remaining ones of the at least two threads back on standby, wherein the selected thread is completely released from the monitor when the selected thread fails to acquire the monitor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 18)
-
-
13. A digital processing apparatus comprising:
-
a processor executing one or more modules of the apparatus; a processing module which executes a program; and a main storage module which provides memory space that is needed for an operation of the processing module, wherein the program comprises first computer code which controls mutually exclusive access to an object by threads with the aid of a monitor, and second computer code which interrupts a thread from threads that are on standby for the monitor; wherein the thread to be interrupted is determined by sequentially waking up at least two of the threads that are on standby for the monitor, checking each of the at least two threads for a condition; and
when a checked one of the at least two threads meets the condition, selecting the checked one of the at least two threads meeting the condition as the thread to be interrupted and placing checked remaining ones of the at least two threads back on standby,wherein the selected thread is completely released from the monitor when the selected thread fails to acquire the monitor. - View Dependent Claims (16, 17, 19)
-
Specification