Simulation of Transactional Memory