Modeling and Verifying Transaction Scheduling for Software Transactional Memory using CSP

Transaction Memory (TM) is designed for simplifying parallel programming, while some key problems exist in it, such as starvation and reduced performance with high contention among transactions. In order to improve the performance of TM, researchers have designed several transaction scheduling algorithms and given their experimental results. However, the evaluations on the algorithms given by these researches are rather partial and lack of generality. Since these experimental results ignore the verification of properties which are necessary for transaction scheduling and could be greatly affected by the execution environment, thus it is still challenging for us to judge the quality of the algorithms for TM. In this paper, we provide a formal approach to evaluate transaction scheduling algorithms in a more comprehensive and strict way. We choose three recently proposed algorithms as motivating examples and formalize them using the process algebra CSP. We also use a model checker PAT to verify the properties (e.g., deadlock freeness and starvation freeness) of the models. Besides, it is also easier to compare the performance of the algorithms, from the perspective of makespan, speedup, aborts time and throughput, based on the statistics given by PAT. Consequently, a formal approach can be achieved to evaluate transaction scheduling algorithms, which is also a good guide for the further design of the algorithms for TM.

[1]  Mikel Luján,et al.  Steal-on-Abort: Improving Transactional Memory Performance through Dynamic Transaction Reordering , 2008, HiPEAC.

[2]  Si Liu,et al.  Modeling and Verifying the Ariadne Protocol Using CSP , 2012, 2012 IEEE 19th International Conference and Workshops on Engineering of Computer-Based Systems.

[3]  Franco Cicirelli,et al.  Modelling and verification of starvation-free mutual exclusion algorithms based on weak semaphores , 2015, 2015 Federated Conference on Computer Science and Information Systems (FedCSIS).

[4]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[5]  Marko C. J. D. van Eekelen,et al.  Deadlock and starvation free reentrant readers-writers: A case study combining model checking with theorem proving , 2011, Sci. Comput. Program..

[6]  Hsien-Hsin S. Lee,et al.  Adaptive transaction scheduling for transactional memory systems , 2008, SPAA '08.

[7]  Danny Hendler,et al.  CAR-STM: scheduling-based collision avoidance and resolution for software transactional memory , 2008, PODC '08.

[8]  Ilija Basicevic,et al.  Transaction scheduling for Software Transactional Memory , 2017, 2017 IEEE 2nd International Conference on Cloud Computing and Big Data Analysis (ICCCBDA).

[9]  Shengchao Qin,et al.  Comparative modelling and verification of Pthreads and Dthreads , 2018, J. Softw. Evol. Process..

[10]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[11]  A. W. Roscoe,et al.  Using CSP to Detect Errors in the TMN Protocol , 1997, IEEE Trans. Software Eng..

[12]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[13]  Hong-Ren Chen Transaction Management Issues in Web Service-oriented Electronic Commerce Systems: Performance Evaluation , 2008, Simul..

[14]  Jun Sun,et al.  Model checking with fairness assumptions using PAT , 2014, Frontiers of Computer Science.