1. In a computer system including a memory shared among a plurality of processing entities, a method of performing compound atomic operations by said processing entities comprising: providing a pool of locks for synchronizing access to the memory; assigning the locks among the plurality of entities to minimize lock contention; and performing the compound atomic operations using the assigned locks.