Markov Chain-Based Adaptive Scheduling in Software Transactional Memory