Anytime control algorithms for embedded real-time systems