Real-time preemptive scheduling of sporadic tasks based on supervisory control of discrete event systems