Real-time system design using preemption thresholds