Burns's paper (being a review) leaves out the affects of inserting delays, so we'll have to turn elsewhere for an answer. The particular section references "Task scheduling in distributed real-time systems" by L. Sha, J.P. Lehoczky, and R. Rajkumar. If you could get ahold of that paper, it should clarify how delay insertion reduces task periods. Sadly, I cannot, so have to resort to supposition.
What happens is almost what you suppose, but the scheduler doesn't need to inspect the process's internals (i.e. it doesn't need to check for the delay) or make any decisions; the natural affects of the delay do the necessary scheduling work. By "delay", I'm assuming a call to sleep()
(or similar), which allows for cooperative multitasking. When considering the following, keep in mind how the scheduler determines period: by keeping track of how long it's been since the process was last schedulable (perhaps using exponential averaging).
There are two relevant affects of sleep()
: the process will be suspended (i.e. removed from scheduling), and will get rescheduled after the delay ends. When the process wakes up, the most recent period began when the process was last schedulable, which is the delay period plus the previous execution time. Consequently, the subtasks can be considered to be tasks with period equal to the delay plus the previous subtask's execution time (note that the subtask period could be considered as consisting of other delay times or subtask execution times; to simplify matters, the requested delays should be equal and the subtask execution times be as close as possible). In other words, a task of period p
and average execution time e
is turned into n
subtasks with period p/n
and execution time e/n
.
For example, Burns's paper mentions a process P2 that runs every 30 seconds for 3 seconds. Inserting two calls to sleep(9)
around 1 and 2 seconds along transforms the task into three subtasks of period 10 and average execution time of 1 second. I believe the delay must be 9 seconds, as shortening the delays would increases the period between the 3rd and 1st subtasks (when it comes around again), increasing the period for the 1st subtask, which would reduce its priority.