• Nenhum resultado encontrado

2 Re-proof of the DWCS-2 sufficient condition

As stated in previous section, bandwidth utilization section (section 4.2 in [West04]) has collapsed, as Lemma 1, theorem 3 and Corollary 1 in the paper are not correct or not correctly proven. In fact, except Lemma 1, the idea of utilization factor is correct in our point of view, so that we will prove them in what follows.

According to the ambiguity of Lemma 1, we will prove the case of fixed yi, that is to say all yi =y. In this special case, theorem A is very simple to be proven, and is stated:

Theorem A: Consider a set of n streams, Γ = {S1, … , Sn}, where Si∈Γ is defined by the 3-tuple with the same windows constraint factors (Ci = K; Ti = qK; wi = xi/y). If the utili- zation factor, U = in1(y xi) 1.0

qy

=

∑ , then no more than q streams out of n have 0 window- constraint at any time. Such that the stream set is schedulable under DWCS scheduling.

Proof: We can say that if no violation of window constraints occurs in a window size, all Window-Constraint factors will be reset as the initial value as wi = xi/y.

128

Lemma A: In every window, the sum of Window-Constraint (W=∑ni=1wi) at the period beginnings is a monotone increasing function.

Proof: We think of the condition n>q, because otherwise deadline misses never oc- cur.

In every period, q streams can be serviced and n-q streams’ packet will be lost. Such that the stream set can be split into two subsets:

1). q streams are serviced in the period and WC are modified as

1 xi

y− after the current period (denoted as α).

2). n-q streams are not serviced and their WC turn as the 1

1 xj

y

after the current pe- riod (denoted as β).

W=wi+wj W=wi+wj wi

wj wj

wi

W’’=wi’’+wj’’

w’’i w’’j

then, the change of sum of window-constraint values can be illustrated as follows:

W’-W = (wi' wi) (wi' wi)

α β

+

∑ ∑ = ( ) ( 1 )

1 1

j j

i xi x x

x

y y y y

α β

+

∑ ∑ = ( ) ( 1)

1 1

i wj

w

y y

α β

+

∑ ∑

= ( ) ( 1 )

1 1

wi

y y

α β+ β

∑ ∑ ≥ 1 ( ( ))

1 wi n q y α β+

with the condition of ni 1(y xi) 1.0 qy

=

∑ , it is easy to get ∑ni=1wi− −(n q)≥0. Such that W’- W≥0.

In the same way, W≤W’≤W’’ and so forth till the beginning of the last period in the window. At the end of window, all window-constraints are reset as initial value.

End of proof

129

According to Lemma A, at each and every end of period, the sum of window- constraint value is never smaller than (n-q), and because each window-constraint is no higher than 1. Therefore, no more than q zero window-constraints can exist in any period.

Thus, all window-constraints can be satisfied.

End of proof in condition of the same window size.

The more general case, when yi and xi are variables, is more complicated to prove.

As stated in [West04], window-constraint and (m,k)-firm constraint can be transformed each other. Moreover, Window-constraint has been proven as NP-hard in strong sense [Mok01]. Its similar constraint (m,k)-firm has also been proven as NP-hard in strong sense [Quan00]. This means that no optimal scheduling can be found for them. Further- more, in [Mok01], under certain special conditions, there are the efficient on-line poly- nomial-time optimal algorithms.

One special condition is: streams are synchronized at time 0, have unit service time and their periods are multiple of service time. Under these conditions, one optimal P-fair window-constraint stream set is schedulable in condition of ni 1(yi xi) 1.0

qyi

=

∑ [Mok01]. We

should explain P-fair window-constraint at first.

We prove it with the concept of P-fair window-constraint introduced in [Mok01].

Unit size assumption [Mok01] states: if the execution time of all the tasks in a task set is 1, then the task set is a unit-size task set, and its scheduling problem is a unit-size sched- uling problem.

A schedule is P-fair if and only if the schedule satisfies not only the constraints de- fined in the definition of unit-size schedule, but also scope constraint as: the lth P-fair scope of stream i is defined as: i , ( 1) i

i i

l k l k

i m i i m i

r p r + ⋅ p

+ +

, where l denotes a time interval length, ri denotes the release time, pi is the period, mi and ki denotes that mi deadlines should be met among ki consective ones.

Lemma B: if a stream set satisfies P-fair window-constraint, then, it has already satisfied window-constraint in [West04].

130

Proof: Obviously, the beginning of ((a-1)m)th P-fair scopes and the end of (am)th P- fair scopes (where a is natural number) equal the beginning and the end the ath window size of Window-constraint, respectively. Therefore, if P-fair window-constraint is satis- fied from ((a-1)m)th instance to (am)th instance, then window-constraint is surely satisfied in ath window for window-constraint.

End of proof.

Intuitively, window-constraint is less restricted than P-fair window-constraint, since it doesn’t require the distribution of executions in windows.

Theorem B: there is a set of n streams, Γ = {S1, … , Sn}, where Si∈ Γ is defined by the 3-tuple (ci = K; pi = qK; wi = xi/yi). If the utilization factor satisfies, U =

( )

1 y x 1.0

n i i

i qyi

=

∑ , then all windows constraints can be satisfied.

Proof:

We insert one virtual stream with a window constraint µ/µ=1, where µ is one very small positive number (for example 0.001), the window-constraint value is reset at every period. The virtual stream is defined as (cv = K; pv = K; wv =µ/µ). Clearly, this virtual stream has the highest priority among value 1 window-constraints. The service of this virtual stream can never cause the failure state of the system, because it is serviced only when all streams have the value 1 window constraints. Therefore, for every stream, it can be serviced exactly (yi-xi) times in each window under feasible situation, otherwise, sys- tem fails into failure state.

In P-fair schedule, the server could be idle in condition that all P-fair constraints have been satisfied. The idle time can be mapped to Virtual Stream service in window constraint, such that the problem of schedule of window constrained stream set (except virtual stream) can be constructed with a one-to-one mapping with P-fair scheduling.

In fact, DWCS only needs to re-sort the P-fair schedule pattern according to its rules shown in Table 2 in [West04], and the process is shown in Algorithm 1. Since all streams have been allocated exactly (yi-xi) execution time, this re-sort program must be able to produce correct DWCS pattern in polynomial time. After this mapping, the second step is

131

to distribute occupations of the Virtual Stream to other normal streams in set, as shown in Algorithm 2. The distribution is done according to the lowest window-numerator first order according to Table 2 in [West04] as well. So far, the stream set (without virtual stream) schedule has been constructed.

So due to the construction, windows constraint schedule exists.

End of Proof

Notice that DWCS can give a high utilization schedule even the proof has problem.

While based on the results in relative paper [Mok01], we gave the proof as above.