Patent ID: 7404183

Claim:
A method of transforming a lock on an object in a loop of a computer program, said lock having a pair of lock and unlock operations applicable on said object at original points within said loop, said method comprising: (i) moving, during runtime, said lock and unlock operations from said original points inside said loop to points outside said loop; (ii) inserting a contention test within said loop such that said lock is unlocked if access to said object is required by another thread during execution of said loop; and (iii) transforming said loop into an inner loop and an outer loop, said inner loop having a strip length S and said outer loon having its number of iterations dependant upon S, said contention test in (ii) being provided outside said inner loop but inside said outer loop; wherein in (ii), said contention test is inserted at the original point of said lock operation; and wherein said loop has N iterations.