Optimizing accesses to read-mostly volatile variables
AssigneeInternational Business Machines Corporation
InventorsKazunori Ogata, Hiroshi Horii
Life of this patent
Estimating the term…
Abstract
A computer-implemented method, computer program product, and computer processing system are provided for eliminating a memory fence for reading a read-mostly volatile variable of a computer system. The read-mostly variable is read from more than written to. The method includes writing data to the read-mostly volatile variable only during a Stop-The-World (STW) state of the computer system. The method further includes executing the memory fence in any mutator threads and thereafter exiting the STW state. The method also includes reading the read-mostly volatile variable by the mutator threads without executing the memory fence after the STW state.
Claims20
A computer-implemented method for eliminating a memory fence for reading a read-mostly volatile variable of a computer system, the read-mostly variable being read from more than being written to, the method comprising:
- writing data to the read-mostly volatile variable only during a Stop-The-World (STW) state of the computer system;
- executing the memory fence in any mutator threads and thereafter exiting the STW state;
- and
- reading the read-mostly volatile variable by the mutator threads without executing the memory fence after the STW state.
A computer program product for eliminating a memory fence for reading a read-mostly volatile variable of a computer system, the read-mostly variable being read from more than being written to, the computer program product comprising a non-transitory computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to cause the computer to perform a method comprising:
- writing data to the read-mostly volatile variable only during a Stop-The-World (STW) state of the computer system;
- executing the memory fence in any mutator threads and thereafter exiting the STW state;
- and
- reading the read-mostly volatile variable by the mutator threads without executing the memory fence after the STW state.
A computer processing system for eliminating a memory fence for reading a read-mostly volatile variable of the computer processing system, the read-mostly variable being read from more than being written to, the computer processing system comprising:
- a virtual machine, having a memory operatively coupled to a processing element, and being configured to
- write data to the read-mostly volatile variable only during a Stop-The-World (STW) state of the computer system;
- execute the memory fence in any mutator threads and thereafter exiting the STW state;
- and
- read the read-mostly volatile variable by the mutator threads without executing the memory fence after the STW state.
Dependencies are inferred from the claim text.