**6. Experiment**

A set of experiments have been carried out in order to examine the feasibility of the algorithms in practice. The RTCC-DD method and the OCC-DA, OCC-DATI method are implemented using C++ and compiled with gcc. All tests were performed on a Dell OptiPlex GX270 PC with 2GB of RAM. The database is composed of pages with a number of records and the records meet uniform distribution; the main performance criteria are the transaction miss percentage.


Table 1. Simulation Parameter

The traditional optimistic concurrency control methods (OCC-DA, OCC-DATI) and the RTCC-DD method are compared in the experiment. The experiment results are shown in Fig. 2. In Fig. 2a, the average temporal data number of transactions accesses changing from 0 to 25, the performance of RTCC-DD is better than OCC-DA and OCC-DATI. The reason is that transactions scheduling considers the deadline of data in RTCC-DD method. If the submitted time exceeds the deadline, the transaction will be restarted. And the methods of OCC-DA and OCC-DATI do not consider the constraint of temporal data. When transaction accesses a little temporal data, the difference of the performance are small, but as shown in Fig. 2b, if there are a lots of temporal data, RTCC-DD method is obvious better than the traditional concurrency control methods. With increasing the temporal data numbers in system, the influence of the time constrain will increase. The more transactions will miss its deadlines because of not satisfy the data deadline.

a. Little Number of Temporal Data b. Much Number of Temporal Data

Fig. 2. Transactions Miss Percentage

### **7. Conclusion**

186 Real-Time Systems, Architecture, Scheduling, and Application

Proof, according to the rule 1, if L (T) 0 <sup>t</sup> = , assigned serial number for the transaction T ser(T), guarantee only when the transaction access into the validation phase we assigned serial number, and the serial number is only, according to rule 3 we dynamic adjust the conflict transaction, and guarantee the least serial number first submit. According to the rule 4, only when all the conflict transactions serialize after this transaction, submit this transaction, so submitting the transactions is constrain by serializability number, ensure the

A set of experiments have been carried out in order to examine the feasibility of the algorithms in practice. The RTCC-DD method and the OCC-DA, OCC-DATI method are implemented using C++ and compiled with gcc. All tests were performed on a Dell OptiPlex GX270 PC with 2GB of RAM. The database is composed of pages with a number of records and the records meet uniform distribution; the main performance criteria are the

*parameter value* 

The traditional optimistic concurrency control methods (OCC-DA, OCC-DATI) and the RTCC-DD method are compared in the experiment. The experiment results are shown in Fig. 2. In Fig. 2a, the average temporal data number of transactions accesses changing from 0 to 25, the performance of RTCC-DD is better than OCC-DA and OCC-DATI. The reason is that transactions scheduling considers the deadline of data in RTCC-DD method. If the submitted time exceeds the deadline, the transaction will be restarted. And the methods of OCC-DA and OCC-DATI do not consider the constraint of temporal data. When transaction accesses a little temporal data, the difference of the performance are small, but as shown in Fig. 2b, if there are a lots of temporal data, RTCC-DD method is obvious better than the traditional concurrency control methods. With increasing the temporal data numbers in system, the influence of the time constrain will increase. The more transactions will miss its

*400 100ms 10ms 20ms 80% 5~50 10 10~200ms* 

*Database size Transaction execute time CPU computation time Disk access time Page hit rate Operation number per transaction Restart overhead Mean transaction arrive time* 

**Theorem 2** RTCC-DD can guarantee the serializability of the transactions scheduling

serializability.

**6. Experiment** 

transaction miss percentage.

Table 1. Simulation Parameter

deadlines because of not satisfy the data deadline.

The concurrency control method is one of the key problems in the database systems. The optimistic methods are widely used in database system because it is not exists deadlock and block. Unnecessary transactions restarting and nearing completing transactions missing its deadline are the key factor effecting optimistic concurrency control method performances.

Real-Time Concurrency Control Protocol Based on Accessing Temporal Data 189

J. Lindstrom and K. Ratikainen. Dynamic adjustment of serialization order using timestamp

J. Lindstrom. Optimistic concurrency control methods for real-time database systems. Ph. D.

J. R. Haritsa, M. J. Carey and M. Livny. Dynamic real-time optimistic concurrency control. In

J. R. Haritsa, M. J. Carey, and M. Livny. Dynamic real-time optimistic concurrency

J. R. Haritsa, M. J. Carey, and M. Livny. On being optimistic about real-time constraints. In

K. Ramamritham. Real-time databases. Distributed and Parallel Databases, 1:199–226, April

K. W. Lam, K. Y. Lam, and S. Hung. An efficient real-time optimistic concurrency

K. W. Lam, S. H. Son, and S. Hung. A priority ceiling protocol with dynamic adjustment of

L. Sha, R. Rajkumar, and J. P. Lehoczky. Concurrency control for distributed real-time

L. Sha, R. Rajkumar, and J. P. Lehoczky. Priority inheritance protocols: An approach to real-

L. Sha, R. Rajkumar, S. H. Son, and C. -H. Chang. A real-time locking protocol. IEEE

M. Xiong, R. M. Sivasankaran, J. A. Stankovic, K. Ramamritham and D. Towsley. Scheduling

S. H. Son, K. J. Lin. Real-Time Database Systems: Issues and Applications. Kluwer Academic

T. Kuo and A. K. Mok. Real-time data semantics and similarity-based concurrency control.

T. Kuo, A. K. Mok, SSP: a semantics-based protocol for Real-time data access. 14th IEEE real-

Y. S. Liu, G. H. Li. The effect of real-time database data characteristics on transactions.

Journal of computer research & development. 1999, 36(3): 364~368.

Engineering, Birmingham, UK, 1997. IEEE Computer Society Press.

databases. ACM SIGMOD Record, 17(1):82–98, March 1988.

Transactions on Computers, 40(7):793–800, January 1991.

IEEE Transactions on Computers. 2000, 49(11): 1241~1254.

China, 1999. IEEE Computer Society Press.

Press.

1993.

Springer.

September 1990.

time Systems Symposium. 1996.

time systems symposium. 1993.

Publishers, 1997. 167-191

dissertation. University of Helsinki, FINLAND, 2003.

331–343, Nashville, Tennessee, 1990. ACM Press.

Proceedings of the 11th real-time symposium, 1990. 94~103.

intervals in real-time databases. In Proceedings of the 6th International Conference on Real-Time Computing Systems and Applications, pages 13–20, Hong Kong,

control. In Proceedings of the 11th IEEE Real-Time Systems Symposium, pages 94–103, Lake Buena Vista, Florida, USA, 1990. IEEE Computer Society

Proceedings of the 9th ACM Symposium on Principles of Database Systems, pages

control protocol. In Proceedings of the First International Workshop on Active and Real-Time Database Systems, pages 209–225, Sk¨ovde, Sweden, 1995.

serialization order. In Preceedings of the 13th IEEE Conference on Data

time synchronization. IEEE Transactions on Computers, 39(9):1175–1185,

transactions with temporal constraints: exploiting data semantics. 17th IEEE Real-

Most of the research about the optimism concurrency control method are focus on how reduces unnecessary transactions restarts and the transactions near to completed missing its deadline. The most research is based on dynamic adjustment serialization method. When the transactions access temporal data with time limit, the traditional concurrency control method cannot schedule effectively because it is not consider data-deadline. This chapter improved the validation phase rules and proposed an optimistic concurrency control method based on temporal data (RTCC-DD), which considered the influence between temporal data time limit and the transaction deadline. Theoretical analysis and experimental results demonstrate that the RTCC-DD method can outperform the previous ones for reducing effectively unnecessary restart number of transactions and more suitable for realtime database system.
