Research Article

On-Line Real-Time Service-Oriented Task Scheduling Using TUF

Algorithm 3

Preemption checking.
1: input: Let 𝜏 0 be the task currently being executed, and
  𝜏 𝑝 be the task wants to preempt 𝜏 0 , current time be 𝑑 ,
   𝜌 0 ( 𝜏 0 , 𝑑 ) be the conditional expected utility density of 𝜏 0
 at time 𝑑 , 𝜌 𝑝 ( 𝐢 𝑝 ) be the expected utility density of 𝜏 𝑝 ,
  𝐢 𝑝 and 𝐢 0 are the expected execution time of 𝜏 𝑝 and 𝜏 0 ,
respectively;
2:
3:When a new task arrives or it is the preemption checking
 point
4: If 𝜌 𝑝 ( 𝐢 𝑝 ) βˆ’  𝜌 0 ( 𝜏 0 , 𝑑 ) > 𝜁 then
5:  Check what is 𝜏 0 ’s worst case finish time;
6:  If 𝑆 𝜏 0 + π‘Š 𝐸 𝜏 0 ≀ 𝐷 𝜏 0 then
7:   Preemption not allowed;
8:  else
9:   Preemption allowed;
10:  end if
11: end if