Hybrid Parallel Programming Using Locks and STM
DOI:
https://doi.org/10.26438/ijcse/v5i10.185192Keywords:
Multiprocessing, Parallel Processing, Locks, Software Transactional Memory, Hybrid Parallel ProgrammingAbstract
Software Transactional Memory (STM) is a new alternative approach to locks which solves the problem of synchronization in parallel programs. In STM users have to identify the critical sections in the program and enclose them within transactions by using appropriate STM function calls. Then STM automatically by its internal constructs ensures synchronization in the program. This paper shows how to solve the problem of synchronization in parallel programs by using a hybrid programming approach using both locks and STM. Locks use pessimistic approach to solve the problem of synchronization in parallel programs. STM uses optimistic approach to solve the problem of synchronization in parallel programs. Both the optimistic and pessimistic approaches have some advantages and disadvantages. The disadvantage of optimistic approach is that transactions are aborted when validation cannot be done. This approach works well when there are no conflicts (hence the term optimistic) but wastes work when there are conflicts. Aborting of transactions is a severe problem when the transactions are long and interactive. The disadvantage of pessimistic approach is that large number of locks in the program will lead to very slow execution speed which may cancel out the gains made by solving the problem in parallel. The hybrid approach combines the advantages of the optimistic and pessimistic approaches removing their disadvantages without any degradation of performance.
References
Ryan Saptarshi Ray,“STM:Lock-Free Synchronization”, Special Issue of IJCCT, ISSN (ONLINE): 2231 – 0371, ISSN (PRINT): 0975 – 7449, Volume- 3, Issue-2, pp. 19-25, February 2012
Ryan Saptarshi Ray and Utpal Kumar Ray, “Writing Lock-Free Code”, In the Proceedings of International Conference on Computer Science and Engineering(ICCSE),Kolkata, pp. 19-25, 24th March 2012
Pascal Felber, Christof Fetzer, Torvald Riegel, “Dynamic Performance Tuning of Word-Based Software Transactional Memory” In the Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pp. 237-246 ,2008
Philip S.Yu, Daniel M. Dias, “Analysis of Hybrid Concurrency Control Schemes For a High Data Contention Environment”, IEEE TRANSACTIONS ON SOFTWARE ENGINEERING,Volume-18, Issue-2, pp. 118-129, 1992
Sang H. Son, Junhyoung Lee, “A New Approach to Real-Time Transaction Scheduling”, In the Proceedings of the Fourth Euromicro workshop on Real-Time Systems, pp. 177-182, June 1992
Sung Ho Cho, JongMin Lee, Chong-sun Hwang, WonGyu Lee, “Hybrid Concurrency Control for Mobile Computing” In the Proceedings of High Performance Computing on the Information Superhighway, pp. 478-483, April 1997
SungHo Cho, “A Hybrid Concurrency Control with Deadlock-free Approach”, In the Proceedings of the International Conference on Computational Science and Its Applications, pp. 517-524, 2003
Jan Lindstrom, “Hybrid Concurrency Control Method in Firm Real-Time Databases”
Debendranath Das, Ryan Saptarshi Ray, Utpal Kumar Ray, “Implementation and Consistency Issues in Distributed Shared Memory”, International Journal of Computer Sciences and Engineering (IJCSE) E-ISSN:2347-2693 Volume- 4, Issue-12, pp 125-131, 2016
Downloads
Published
How to Cite
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors contributing to this journal agree to publish their articles under the Creative Commons Attribution 4.0 International License, allowing third parties to share their work (copy, distribute, transmit) and to adapt it, under the condition that the authors are given credit and that in the event of reuse or distribution, the terms of this license are made clear.
