Parallelizing sequential applications on commodity hardware using a low-cost software transactional memory