Adaptive Model-based Scheduling in Software Transactional Memory