**4. Related definition and validation mechanism**

As another temporal limit of transaction, data-deadline, if it is less than transactiondeadline, we must consider it; otherwise transactions may read inconsistent temporal data when transactions commit. In order to ensure temporal consistency and the data which transaction read to be effective, we must inspect and estimate the execution time.

**Definition2.** Transaction-deadline is d(T) , estimated time of completion is C (T) <sup>t</sup> , so delay time is t t sd (T) d(T) C (T) = − . Because validation transaction has been completed all operation reading and writing, delay time is t t sd (T) d(T) C (T) = − .

**Definition3.** If to L (T) <sup>t</sup> = φ, we denoted tsdt(T) as temporal delay time of transaction T.

$$\text{trsd}\_{\iota}(T) = \begin{cases} d(T) - C\_{\iota}(T), & \text{dd}\_{\iota}(T) \ge d(T) \\ \text{dd}\_{\iota}(T) - C\_{\iota}(T), & \text{dd}\_{\iota}(T) < d(T) \end{cases}$$

**Definition4.** At time t, the starting time of transaction T is s(T) , the deadline of transaction T is d(T) ; we denoted TFD (T) t s(T) d(T) s(T) <sup>t</sup> =− − as the completeness of transaction T.

**Definition5.** Suppose the conflict transaction set of validation transaction Tv is CTS(T), validation factor of Tv shows the ratio between the completeness of Tv and the completeness of CTS(T), denoted VF (T ) TFD (T ) TFD (T) tv tv t = , T CTS(T) ∈ . If VF (T ) 1 t v > at time t , it shows validation transaction is easier to complete t than conflict transaction.

**Definition6.** Minimum running time of transaction was described from the current time t to the required execution time of transaction.

If the deadline which transaction read temporal data objects is less than minimum running time, transaction can't commit in validity, so the validity is impossibility. Before transaction read data, we use a validation mechanism to check the validity of the data. It is used to prevent transaction from reading invalid data, or the data which has not validity.

Before transaction executing, we declare that transaction access temporal data set to RS (T) in s(T) advance, the number of temporal data is to L (T) . After transaction executing, we access s(T) temporal data successively and check the validity of data dynamically in the process. If dd (T) d(T) <sup>t</sup> > , and to L (T) <sup>t</sup> = φ , data-deadline would be longer than transaction-deadline, and transaction can't access other temporal data, so it can't affect the scheduling and concurrency control. If dd (T) d(T) <sup>t</sup> > , but to L (T) <sup>t</sup> ≠ φ , transaction will access other temporal data, so we must check whether satisfy dd (T) d(T) <sup>t</sup> > or not, when access all the temporal data. CHECKING Algorithm was described as follows.

CHECKING Algorithm (): INPUT: to 12 m RS (T) {X ,X ...X } s(T) = OUTPUT: k, to L (T) t { k = ∞ ; to N L (T) = s(T) ; i=1; While ( to RS (T) <sup>t</sup> ≠ ∅ )

{T accesses Xi from RS(T) ;

```
to 12 m i RS (T) {X ,X ...X } {X } t = − ; 
   if(| avie (Xi) -avib (Xi) |<k) 
       then if dd (T) C (T) t t <
            then Abort(T); 
            else 
                       i j j
                             e b
                      j 1
                 k k |avi (X ) avi (X )| =
                   = −  ;} 
   to L (T) N 1 t = − ; 
   i=i+1; 
}
```
182 Real-Time Systems, Architecture, Scheduling, and Application

As another temporal limit of transaction, data-deadline, if it is less than transactiondeadline, we must consider it; otherwise transactions may read inconsistent temporal data when transactions commit. In order to ensure temporal consistency and the data which

**Definition2.** Transaction-deadline is d(T) , estimated time of completion is C (T) <sup>t</sup> , so delay time is t t sd (T) d(T) C (T) = − . Because validation transaction has been completed all

> ( ) ( ), ( ) ( ) ( ) ( ) ( ), ( ) ( ) *t t*

 − ≥ <sup>=</sup> − < 

*dd T C T dd T d T*

*tt t d T C T dd T d T*

**Definition4.** At time t, the starting time of transaction T is s(T) , the deadline of transaction T is d(T) ; we denoted TFD (T) t s(T) d(T) s(T) <sup>t</sup> =− − as the completeness of transaction T.

**Definition5.** Suppose the conflict transaction set of validation transaction Tv is CTS(T), validation factor of Tv shows the ratio between the completeness of Tv and the completeness of CTS(T), denoted VF (T ) TFD (T ) TFD (T) tv tv t = , T CTS(T) ∈ . If VF (T ) 1 t v > at time t , it shows validation transaction is easier to complete t than conflict transaction.

**Definition6.** Minimum running time of transaction was described from the current time t to

If the deadline which transaction read temporal data objects is less than minimum running time, transaction can't commit in validity, so the validity is impossibility. Before transaction read data, we use a validation mechanism to check the validity of the data. It is used to

Before transaction executing, we declare that transaction access temporal data set to RS (T) in s(T) advance, the number of temporal data is to L (T) . After transaction executing, we access s(T) temporal data successively and check the validity of data dynamically in the process.

and transaction can't access other temporal data, so it can't affect the scheduling and

data, so we must check whether satisfy dd (T) d(T) <sup>t</sup> > or not, when access all the temporal

φ

, data-deadline would be longer than transaction-deadline,

, transaction will access other temporal

prevent transaction from reading invalid data, or the data which has not validity.

φ

concurrency control. If dd (T) d(T) <sup>t</sup> > , but to L (T) <sup>t</sup> ≠

data. CHECKING Algorithm was described as follows.

, we denoted tsdt(T) as temporal delay time of transaction T.

transaction read to be effective, we must inspect and estimate the execution time.

operation reading and writing, delay time is t t sd (T) d(T) C (T) = − .

**4. Related definition and validation mechanism** 

φ

the required execution time of transaction.

If dd (T) d(T) <sup>t</sup> > , and to L (T) <sup>t</sup> =

CHECKING Algorithm (): INPUT: to 12 m RS (T) {X ,X ...X } s(T) =

{T accesses Xi from RS(T) ;

OUTPUT: k, to L (T) t { k = ∞ ; to N L (T) = s(T) ; i=1; While ( to RS (T) <sup>t</sup> ≠ ∅ )

*t*

*tsd T*

**Definition3.** If to L (T) <sup>t</sup> =

Before transaction access each temporal data, we call CHECKING Algorithm to ensure the effectiveness of temporal data. At the same time, through dynamically adjusting value k, we make the variable data consistency.

**Lemma1**. CHECKING Algorithm can ensure the consistency of variable temporal data.

If | avie (X) -avib (X) | < k , we denoted temporal data as changeful, otherwise stable. Value k denoted the length of absolute validity; it changed dynamically along with the transaction access to temporal data, and the smaller the k value is shows the more unstable temporal data is. If temporal data which transaction access the next is more changeful than the current, | avie (Xi) -avib (Xi) |<k , we restart to check whether the data can submit before the deadline, if it can satisfy the temporal consistency, value k will be changed the absolute valid length of temporal data. So CHECKING Algorithm check the consistency of each of variable data to ensure transaction to submit correctly.

**Theorem1.** CHECKING Algorithm can ensure the consistency of transaction scheduling temporal data.

**Prove.** Induce the number of temporal data n(T) which transaction T need access, When n(T)=1, proposition was established obviously, otherwise transaction will abort. Supposed n(T)=m, proposition was established. When n(T)=m+1, it can be divided into two cases:

