• 沒有找到結果。

Constant Utilization and Total Bandwidth Servers Total Bandwidth Servers 郭大維 教授 郭大維 教授

N/A
N/A
Protected

Academic year: 2022

Share "Constant Utilization and Total Bandwidth Servers Total Bandwidth Servers 郭大維 教授 郭大維 教授"

Copied!
7
0
0

加載中.... (立即查看全文)

全文

(1)

Constant Utilization and Total Bandwidth Servers Total Bandwidth Servers

郭大維 教授 郭大維 教授

[email protected]

嵌入式系統暨無線網路實驗室

(Embedded Systems and Wireless Networking Laboratory)

( y g y)

國立臺灣大學資訊工程學系

All Rights Reserved; Tei-Wei Kuo, National Taiwan University Source: Jane W.S. Liu, “Real-Time Systems,” Prentice Hall, 2000.

Schedulability of Sporadic Jobs in Deadline Driven Systems

Deadline-Driven Systems

• Definition Revisiting: g

– Tasks versus Jobs

– Earliest Deadline First (EDF) Scheduling( ) g

• Definition: The density of a sporadic job with an arrival time ri maximum execution time ei and arrival time ri, maximum execution time ei, and the absolute deadline di is ei

/(d

i

-r

i

).

• Definition: A job is active in its interval (r d ]

• Definition: A job is active in its interval (ri,di].

• Theorem 7.4 [Jane Liu, RTS2000] A system of

i d d t t bl di j b i

independent preemptable sporadic jobs is schedulable by EDF if the total density of all

ti j b i t th 1 t ll ti

active jobs is no greater than 1 at all times.

(A sufficient condition)

(2)

Schedulability of Sporadic Jobs in Deadline Driven Systems

Deadline-Driven Systems

• Definition: The instantaneous utilization of a

• Definition: The instantaneous utilization of a sporadic job Si,jis ui,j= ei,j / pi,j, where pi,j denotes the release-time difference between S and S

the release-time difference between Si,jand Si,j+1.

• Definition: The instantaneous utilization of a sporadic task S is u = max (e / p )

sporadic task Si is ui = maxj(ei,j / pi,j).

• Corollary 7.5 [Jane Liu, RTS2000] A system of n

i d d bl di k i

independent preemptable sporadic tasks is schedulable by EDF if the total instantaneous

tili ti

f ll ti j b i t th 1

utilization of all active jobs is no greater than 1,

where the relative deadline of every job is equal

t it i d (i th l ti diff )

to its period (i.e., the release-time difference).

(An extension to the considerations of periodic tasks)

Constant Utilization Server

• A constant utilization server is defined by its instantaneous utilization u

s

, where the scheduling of instantaneous utilization u

s

, where the scheduling of periodic tasks and servers is done by EDF.

– Consumption Rule: A server consumes its budget onlyCo su pt o u e se e co su es ts budget o y when it executes for some sporadic job.

– Replenishment Rule: (es: budget; d: deadline)

1) Initially, es=0 and d=0.

2) When a sporadic job with execution time e arrives at time t to an empty queue

an empty queue,

a) If t < d, do nothing; otherwise, d = t + e/us, and es=e.

3) At the deadline d of the server,) ,

a) If the server is backlogged, set the server deadline to d + e/us, and es=e.

b) If th i idl d thi

b) If the server is idle, do nothing

A constant utilization server is always given enough budget to complete the job at its queue head each time its budget is replenished.

(3)

Constant Utilization Server

• A1: d=3+1.0/0.25=7; A2: At 7, d=7+2/0.25=15; A3: d=23.5

* There is no deadline missing for all periodic tasks if the total size of constant bandwidth servers is no larger than (1-Δ) if Δ is the total density (ei/min(di,pi)) of periodic tasks.

Total Bandwidth Server

• Motivation: Improve a constant utilization server by allowing a server to claim the unused by allowing a server to claim the unused background time.

C ti R l A it b d t l

– Consumption Rule: A server consumes its budget only when it executes for some sporadic job.

Replenishment Rule: (e : budget; d: deadline) – Replenishment Rule: (es: budget; d: deadline)

1) Initially, es=0 and d=0.

2) When a sporadic job with execution time e arrives at time t to 2) When a sporadic job with execution time e arrives at time t to

an empty queue, set d to max(d,t) + e/us, and es=e.

3) When the server completes the current aperiodic job, the job is removed from the queue

is removed from the queue.

a) If the server is backlogged, set the server deadline to d + e/uss, and ess=e.

b) If the server is idle, do nothing

(4)

Total Bandwidth Server

A1: d=3+1.0/0.25=7; A2: At 7, d=7+2/0.25=15; A3 now arrives at 14.

At 14, the d is 15, and the new d = 23.5. A3 completes at 17.5,

i t d f 19 b A3 th idl i (14 15)

instead of 19 because A3 now uses the processor was idle in (14,15).

14

Total Bandwidth Server

• Corollary 7.7 [Jane Liu, RTS2000] When a system of independent preemptable periodic tasks is schedulable with independent, preemptable periodic tasks is schedulable with one or more total bandwidth and constant utilization servers on the EDF basis, every periodic task and every server meets its deadline if the sum of the total density of periodic tasks and the total size of all servers is no greater than 1.

C ll 7 8 [J Li RTS2000] Wh t f

• Corollary 7.8 [Jane Liu, RTS2000] When a system of independent, preemptable periodic tasks is schedulable with one or more total bandwidth and constant utilization servers one or more total bandwidth and constant utilization servers on the EDF basis, every periodic task and every server meets its deadline if the sum of the total density of periodic tasks and the total size of all servers is no greater than 1 – bmax(np)/Dmin, where bmax(np) and Dmindenote the maximum nonpreemptable duration and the min(relative deadlines nonpreemptable duration and the min(relative deadlines, sporadic job execution time), respectively.

(5)

Fairness and Starvation

• Fairness: The fraction time of the processor time in the interval attained by each server that is in the interval attained by each server that is backlogged throughout the interval is proportional to the server size

to the server size.

– Total bandwidth servers could be unfair:

• The size of TB1/TB2 is 0.5;

• TB1 remains backlogged in (0, t), but TB2 is idle.

B t TB1 h t d f t ti it d it d dli

• By t, TB1 have executed for t time units, and its deadline is at least 2t.

• Between t and 2t jobs with execution time less than tBetween t and 2t, jobs with execution time less than t arrives and keep TB backlogged; The deadline of TB2 is less than TB1

• As a result, it is unfair in (t,2t) even though it is fair in (0,t), where t can be any number.

Fairness and Starvation

• Fairness Revisiting: The fraction time of the processor time in the interval attained by each processor time in the interval attained by each server that is backlogged throughout the interval is proportional to the server size

is proportional to the server size.

– A scheduler is fair in the interval (t1, t2) if the li d i (t t )/ tt i d b ll normalized service wi(t1,t2)/ui attained by all servers that are backlogged during the interval

diff th th f i th h ld

differ no more than the fairness threshold FR>=0, where wi(t1,t2) is the attained service ti f th i th

time of the i-th server.

i

i

t t u

w

( 1, 2 )

Id ll Or w (t t ) = u (t t )

j i j

i

u t

t

w

=

) , ( 1 2

2

Ideally, 1 Or, wi(t1,t2) = ui (t2-t1)

(6)

Fairness and Starvation

• Why Starvation?

It i b th b k d ti i d

– It is because the background time is made available to some total bandwidth server, e.g.,

TB1 It i l th diff b t t t l

TB1 - It is also the difference between total bandwidth servers and constant bandwidth servers.

• An observation: The current deadline of a constant bandwidth server of size ui is never more than (max ei)/ui. In other words, the length of starvation suffered by any server is bounded by maxi((max ei)/ui).

Fairness and Starvation

• Example: u1=1/4; u2=1/8; u3=1/4; u4=3/8;

Fi t i l A1(t 0 1) A2(0 1) A3(0 3) A4(18 3) – First arrival: A1(t=0,e=1); A2(0,1); A3(0,3); A4(18, 3) – Have servers kept backlogged continuously.

At 18 th d dli f TB1 TB2 d TB3 36 40 – At 18, the deadlines of TB1, TB2, and TB3 are 36, 40,

36, respectively, and they share the 18-unit service time non-proportional to their sizes (i e 8 4 and 6) time non-proportional to their sizes (i.e., 8, 4, and 6).

(7)

Fairness and Starvation

• Example: u1=1/4; u2=1/8; u3=1/4; u4=3/8;

Fi t i l A1(t 0 1) A2(0 1) A3(0 3) A4(18 3) – First arrival: A1(t=0,e=1); A2(0,1); A3(0,3); A4(18, 3) – Have servers kept backlogged continuously.

Aft 18 th li d i f ll

– After 18, the normalized services of all servers are identical in time intervals of length 24 or more. Before 18, CU1 CU2 and CU3 executes for 6 3 and 9 units CU1, CU2, and CU3 executes for 6, 3, and 9 units, respectively. Æ No starvation and no fairness guarantee

參考文獻

相關文件

• Example: Need to run web, mail, file, x, y, z, total of 10 servers...

We have presented a numerical model for multiphase com- pressible flows involving the liquid and vapor phases of one species and one or more inert gaseous phases, extending the

He proposed a fixed point algorithm and a gradient projection method with constant step size based on the dual formulation of total variation.. These two algorithms soon became

A function on an interval with derivative 0 everywhere is a constant function by the mean value theorem... (2 points) (g) Obviously there is no

This work is a contribution to the comprehension on the impact of biodiesel blends of different origin and properties on the unregulated emissions of carbonyl compounds, PAH,

D) an increase in total pressure by the addition of helium gas (V and T constant) E) a decrease in the total volume of the reaction vessel (T constant).

The temperature is raised (at constant pressure) until the volume reaches 211 mL. The total pressure of the sample is 725 mmHg and the partial pressure of argon is 231 mmHg. An

 whole-day face-to-face classes for individual class level(s) - (i) all teachers and school staff (including teaching and non-teaching staff) directly employed by the school have