Hybrid Parallel Programming Using Locks and STM

Authors

  • Saptarshi Ray R Dept. of Information Technology, Jadavpur University, Kolkata, India
  • Bhaumik P Dept. of Information Technology, Jadavpur University, Kolkata, India
  • Kumar Ray U Dept. of Information Technology, Jadavpur University, Kolkata, India

DOI:

https://doi.org/10.26438/ijcse/v5i10.185192

Keywords:

Multiprocessing, Parallel Processing, Locks, Software Transactional Memory, Hybrid Parallel Programming

Abstract

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

2025-11-12
CITATION
DOI: 10.26438/ijcse/v5i10.185192
Published: 2025-11-12

How to Cite

[1]
R. Saptarshi Ray, P. Bhaumik, and U. Kumar Ray, “Hybrid Parallel Programming Using Locks and STM”, Int. J. Comp. Sci. Eng., vol. 5, no. 10, pp. 185–192, Nov. 2025.

Issue

Section

Research Article