Runtime Adaptation in Embedded Computing Systems using Markov Decision Processes