Using preemption threshold scheduling (PTS) in a multi-threaded real-time embedded system reduces system preemptions and hence reduces run-time overhead while still ensuring real-time constraints are met. However, PTS offers other valuable benefits. In this paper we investigate the use of PTS for hard real-time system with limited RAM. Our primary contribution is to prove the optimality of PTS among all preemptionlimiting methods for minimizing a system’s total stack memory requirements. We then discuss characteristics of PTS and show how to reduce average worst-case response times. We also introduce a unified framework for using PTS with existing fixed-priority (e.g. rateor deadline-monotonic), or dynamic-priority scheduling algorithms (e.g. earliest-deadline first). We evaluate the performance of PTS and our improvements using synthetic workloads and a real-time workload. We show PTS is extremely effective at reducing stack memory requirements. Our enhancements to PTS improv...
Rony Ghattas, Alexander G. Dean