It's important to construct your embeded software in layered model in which task scheduling can work.