Research Article

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

Algorithm 2

Generating the speculated execution order and the expected utility for task in the ready queue.
1: Input: Let Ξ“ = { 𝜏 1 , 𝜏 2 , … , 𝜏 π‘˜ } be the accepted tasks in the
 ready queue, and let π‘Ÿ 𝑖 , 𝐢 𝑖 represent the arrival time and
 expected execution time of 𝜏 𝑖 . Let the current time be 𝑑
2: Output: The new list Ξ“ β€² = { 𝜏 ξ…ž 1 , 𝜏 ξ…ž 2 , … , 𝜏 ξ…ž π‘˜ } with the speculated
 execution order and their corresponding expected
 utility density Μ‚ 𝜌 ξ…ž 𝑗 for 𝜏 ξ…ž 𝑗 , 1 ≀ 𝑗 ≀ π‘˜ .
3: If A task 𝜏 0 is being executed then
4:    𝑇 = π‘Ÿ 0 + 𝐢 0 ;
5: else
6:    𝑇 = 𝑑 ;
7: end if
8: While Ξ“ is not empty do
9:  For Each task 𝑖 in Ξ“   do
10:  Calculate 𝜌 𝑖 ( 𝑇 ) based on (3), (4), (5), and
   (6);
11:  end for
12:  Select 𝜏 𝑗 with the highest 𝜌 𝑗 ( 𝑇 ) ;
13:  Add 𝜏 𝑗 to the end of Ξ“ β€² ;
1 4 ∢ Μ‚ 𝜌 𝑗 = 𝜌 𝑗 ( 𝑇 ) ;
15:   𝑇 = 𝑇 + 𝐢 𝑗 ;
16:  Remove 𝜏 𝑗 from Ξ“ ;
17: end while