摘要:
A method, system and computer program product for generating a read-only lock implementation from a read-only lock portion of program code. In response to determining that a lock portion of the program code is a read-only lock, a read-only lock implementation is generated to protect at least one piece of shared data. The read-only lock implementation comprises a plurality of instructions with dependencies created between the instructions to ensure that a lock corresponding to the data is determined to be free before permitting access to that data. In one embodiment, when executed, the read-only lock implementation loads a lock word from a memory address into a register and places a reserve on the memory address. The lock word is evaluated to determine if the lock is free, and, in response to determining that the lock is tree, at least one piece of shared data protected by the lock is accessed. A value is conditionally stored back to the memory address if the reserve is present. A dependency exists between the step of loading of the lock word and the step of accessing the at least one piece of shared data, thereby causing the step of loading of the lock word to be performed before the step of accessing of the at least one piece of shared data.
摘要:
A system enabling Transactional Memory with overflow prediction mechanism, comprising: prediction unit for predicting the mode for the next execution of a transaction based on the final status of the previous execution of the transaction; execution unit for executing the transaction in the execution mode predicted by the prediction unit, wherein the execution mode comprises overflow mode and non-overflow made. According to this invention, before a transaction is executed, it is predicted whether or not the transaction will overflow, and therefore, the execution of the transaction which is necessary to determine whether or not an overflow will occur is saved.
摘要:
An embodiment of the present invention provides an optimizer for optimizing source code to generate optimized source code having instructions for instructing a central processing unit (CPU) to iteratively compute values for a primary recurrence element. A computer programmed loop for computing the primary recurrence element and subsequent recurrence elements is an example of a case involving iteratively computing the primary recurrence element. The CPU is operatively coupled to fast operating memory (FOM) and operatively coupled to slow operating memory (SOM). SOM stores the generated optimized source code. The optimized source code includes instructions for instructing said CPU to store a computed value of the primary recurrence element in a storage location of FOM. The instructions also includes instructions to consign the computed value of the primary recurrence element from the storage location to another storage location of the FOM.
摘要:
This invention provides a system enabling Transactional Memory with overflow prediction mechanism, comprising: prediction unit for predicting the mode for the next execution of a transaction based on the final status of the previous execution of the transaction; execution unit for executing the transaction in the execution mode predicted by the prediction unit, wherein the execution mode comprises overflow mode and non-overflow made. According to this invention, before a transaction is executed, it is predicted whether or not the transaction will overflow, and therefore, the execution of the transaction which is necessary to determine whether or not an overflow will occur is saved and the system performance can be improved.