Patent ID: 7908597

Claim:
A method for executing a plurality of threads in a computer system having a function of parallelly executing a plurality of threads, a memory space sharable by the plurality of threads, and a function of allowing or excluding execution of one thread of the plurality of threads attempting execution with respect to the memory space associated with sharing; said method comprising: providing an area indicating that a data structure in said memory space to be referred to by said one thread was updated or not updated by threads other than the one thread, wherein said area is set at a start point of a section for exclusive execution of the plurality of threads, said section including one or more operations to said data structure; attempting, by said one thread, a first reference in said section to said data structure and a second reference to a content of said area; completing the first reference if the second reference to the content of said area indicates said data structure is not updated and the following conditions are satisfied: (a) the one or more operations to said data structure in said section by the other threads are only by reference and are limited to one, and (b) said section does not involve updating of data being referable from the other threads or input/output processing and interaction detectable between threads or programs of the computer system, except for the reference to the data structure of condition (a), and excluding execution of said one thread if the second reference to the content of said area indicates said data structure is updated or either of the conditions (a) or (b) are not satisfied; wherein said one thread sets the content of said area to indicate said data structure was updated if said one thread updates said data structure, unless the following conditions are satisfied: (1) the number of updates to said data structure performed by said one thread in said section is one, (2) said section does not involve updating of data being referable from the other threads or input/output processing and interaction detectable between threads or programs of the computer system, except for the updating of the data structure of condition (1), and (3) execution of said one thread in said section is completed within a predetermined set of steps; wherein the content of the area indicating that the data structure in said memory space to be referred to by said one program is updated is not returned to a previous content upon completion of updating.