Parallel Processing is extremely important and ubiquitous nowadays. Synchronization Problem is a very important problem in parallel processing. Currently locks are used to solve synchronization problem in parallel processing. However locks suffer from various drawbacks. Software Transactional Memory (STM) is an alternative approach to solve synchronization problem which does not suffer from the drawbacks of locks. In this paper we have solved synchronization problems in a well-known classical problem- Sleeping Barber Problem and a real-life problem- Airline Reservation Problem using locks and STM and have compared their performances. As the performance of STM is as good as that of locks and it does not suffer from the drawbacks of locks hence STM is better than locks. Locks use pessimistic approach. But STM uses optimistic approach and is hence better. Also codes with locks can be converted to codes with STM just by using STM calls in place of lock calls. So STM can be used with legacy code which is a huge advantage.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Software Transactional Memory in Sleeping Barber and Airline Reservation System Problems

  • Upal Chowdhury,
  • Sayan Ghosh,
  • Shyama Mondal,
  • Ryan Saptarshi Ray

摘要

Parallel Processing is extremely important and ubiquitous nowadays. Synchronization Problem is a very important problem in parallel processing. Currently locks are used to solve synchronization problem in parallel processing. However locks suffer from various drawbacks. Software Transactional Memory (STM) is an alternative approach to solve synchronization problem which does not suffer from the drawbacks of locks. In this paper we have solved synchronization problems in a well-known classical problem- Sleeping Barber Problem and a real-life problem- Airline Reservation Problem using locks and STM and have compared their performances. As the performance of STM is as good as that of locks and it does not suffer from the drawbacks of locks hence STM is better than locks. Locks use pessimistic approach. But STM uses optimistic approach and is hence better. Also codes with locks can be converted to codes with STM just by using STM calls in place of lock calls. So STM can be used with legacy code which is a huge advantage.