This paper proposes a scheduling algorithm specially for the embedded system. To meet the requirement of the real-time system, we divide tasks into group based on their resource requirements. In this way, the switch can be done more effectively. The algorithm is static and pre-build because embedded systems have some remarkable features. Real time tasks and interrupts are important, so the algorithm takes them as a special part.