Cooperative Scheduling

Truly preemptive behavior in a system is not always acceptable especially in safety critical systems. Cooperative scheduling (aka deferred preemption) is used to splits tasks into slots.

Interestingly enough, deferred preemption may lead to increased schedulabiliy of the system primary because the mutual exclusion is achieved via non-preemption and the task computabilty time tends to have lower values.

In differed preemption, we can split the application code into a non-preemptive blocks. The size of the block is determined by the maximum blocking time B_{max} in the system.

The way that we model cooperative scheduling is that we split the task in two: C (completed part) and F (the final block of execution) such that:

w_n^{n+1} = B_{max} + C_i - F_i + \sum_{j \in hp(i)} \lceil \frac{w_i^n}{T_j}\rceil C_j

When the equation converges i.e. w_i^n = w_i^{n+1}, the final response time is given by:

R_i = w_i^n + F_i

Leave Comment

Your email address will not be published.

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box