A synchronization method of multiple threads is executed by a computer. The synchronization method includes determining a type of a synchronization process of a first thread performing the synchronization process for synchronization with a second thread; starting time measurement when the type of the synchronization process of the first thread is a first type; performing the synchronization process of the first thread and a synchronization process of the second thread based on a synchronization process history of the second thread when the measured time exceeds a permitted response period of the first thread; and updating the permitted response period and performing the synchronization processes of the first thread and the second thread based on the synchronization process history of the second thread, when another processing request is received.
Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A synchronization method of multiple threads including a first thread and a second thread executed by a processor of a computer, the synchronization method comprising: determining a type of a synchronization process that is to be performed by the first thread for synchronizing with the second thread, by referring to a table that stores both information of synchronization process types corresponding to each of the multiple threads executed by the processor and information of permitted response periods corresponding to each of the multiple threads, wherein each of the multiple threads is being executed to perform processing corresponding to a received processing request; determining a first synchronization point which occurs at the end of the received processing request for the first thread; waiting, by the first thread, at the first synchronization point when the first thread reaches the first synchronization point; when the synchronization process that is to be performed by the first thread is determined to be of a first type: measuring a time while the first thread waits at the first synchronization point; performing the synchronization process of the first thread based on a synchronization process history of the second thread when the measured time exceeds a permitted response period stored in the table that corresponds to the first thread; and both updating the permitted response period and performing the synchronization processes of the first thread and the second thread based on the synchronization process history of the second thread, when another processing request is received.
A method for synchronizing two threads (first and second) running on a computer's processor. The method determines the type of synchronization process the first thread needs to perform with the second thread by consulting a table. This table stores synchronization process types and permitted response times for each thread, where each thread handles a received processing request. A synchronization point is identified at the end of the first thread's received processing request. When the first thread reaches this point, it waits. If the wait time exceeds the permitted response time in the table, the first thread performs synchronization based on the second thread's history. Upon receiving another processing request, the permitted response time is updated, and both threads perform synchronization based on the second thread's history.
2. The synchronization method according to claim 1 , further comprising performing the synchronization processes of the first thread and the second thread when the second thread is in a state to perform the synchronization process before the permitted response period elapses.
The synchronization method described above, where the two threads (first and second) are synchronized on a processor and the first thread performs synchronization based on a table of synchronization types and permitted response periods, also includes performing the synchronization processes of the first and second threads if the second thread is ready to synchronize before the permitted response time for the first thread expires. That is, synchronization will proceed as soon as the second thread is ready, even if the first thread hasn't timed out yet.
3. The synchronization method according to claim 1 , further comprising setting a synchronization state flag of the first thread after performing the synchronization processes of the first thread and the second thread based on the synchronization process history of the second thread.
The synchronization method described above, where the two threads (first and second) are synchronized on a processor and the first thread performs synchronization based on a table of synchronization types and permitted response periods, further includes setting a synchronization state flag for the first thread to indicate that the synchronization processes of the first and second threads have been successfully completed, based on the second thread's history.
4. The synchronization method according to claim 2 , further comprising setting synchronization state flags of the first thread and the second thread to an initial state after performing the synchronization processes of the first thread and the second thread.
The synchronization method described above, including performing the synchronization processes of the first and second threads when the second thread is in a state to perform the synchronization process before the permitted response period elapses, further includes setting the synchronization state flags of both the first and second threads back to their initial states after the synchronization processes are completed. This prepares the threads for subsequent synchronization events.
5. The synchronization method according to claim 1 , further comprising determining the type of the synchronization process of the second thread, when the type of the synchronization process of the first thread is a second type.
The synchronization method described above, where the two threads (first and second) are synchronized on a processor and the first thread performs synchronization based on a table of synchronization types and permitted response periods, also includes determining the type of synchronization process that the second thread needs to perform when the type of synchronization process that the first thread performs is a second, different type. Thus, the logic handles different synchronization needs from both threads.
6. The synchronization method according to claim 5 , further comprising: setting a synchronization state flag of the first thread after performing the synchronization processes of the first thread and the second thread, based on the synchronization process history of the second thread, and omitting the synchronization processes of the first thread and the second thread, when the type of the synchronization process of the second thread is the first type and a synchronization state flag of the second thread is set.
The synchronization method above, which also determines the synchronization process type of the second thread when the first thread's process is of a second type, also includes setting a synchronization state flag of the first thread after performing synchronization processes of the first and second threads (based on the second thread's history). Furthermore, if the second thread's synchronization process type is the first type and the second thread's synchronization flag is already set, the synchronization processes of both the first and second threads are skipped.
7. The synchronization method according to claim 5 , further comprising performing the synchronization processes of the first thread and the second thread, when the type of the synchronization process of the second thread is the second type.
The synchronization method described above, which also determines the synchronization process type of the second thread when the first thread's process is of a second type, also includes performing the synchronization processes of the first and second threads directly if the synchronization process type of the second thread is determined to be the second type. This contrasts with Claim 6 where synchronization might be omitted.
8. The synchronization method according to claim 6 , further comprising setting synchronization state flags of the first thread and the second thread to an initial state.
The synchronization method above, where, when the first thread's synchronization process type is the second type, and if the second thread’s synchronization process type is the first type with the second thread's flag set, the method skips the first and second thread synchronization processes and sets the first thread’s synchronization flag: this method further includes setting the synchronization state flags of both the first and second threads back to their initial states.
9. The synchronization method according to claim 7 , further comprising storing in synchronization process histories of the first thread and the second thread, process results when the synchronization processes are reached.
The synchronization method above, which includes performing the synchronization processes of the first and second threads when the second thread's type is the second type, further includes storing the results of these synchronization processes in the synchronization process histories of both the first and second threads when the processes are completed. This creates a record of past synchronizations.
10. The synchronization method according to claim 1 , further comprising detecting the another processing request when an external input count exceeds a given value.
The synchronization method described above, where the two threads (first and second) are synchronized on a processor and the first thread performs synchronization based on a table of synchronization types and permitted response periods, also includes detecting another processing request when an external input count exceeds a specified threshold value. This allows the system to trigger a re-evaluation and update of the permitted response time based on increased workload.
11. The synchronization method according to claim 1 , wherein updating the permitted response period comprises shortening the permitted response period.
The synchronization method described above, where the two threads (first and second) are synchronized on a processor and the first thread performs synchronization based on a table of synchronization types and permitted response periods, includes updating the permitted response time. This update specifically involves *shortening* the permitted response time.
12. The synchronization method according to claim 1 , wherein performing the synchronization process of the first thread and the synchronization process of the second thread are performed after the updated permitted response period has been elapsed.
The synchronization method described above, where the two threads (first and second) are synchronized on a processor and the first thread performs synchronization based on a table of synchronization types and permitted response periods, wherein the method updates the permitted response time, specifies that the actual synchronization processes of the first and second threads are performed *after* the updated (and likely shortened) permitted response time has elapsed.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
June 13, 2013
June 27, 2017
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.