Cache-aware scheduling algorithm for embedded systems