首页> 外文期刊>Procedia Computer Science >A Comparison of Lock-based and Lock-free Taskpool Implementations in Haskell
【24h】

A Comparison of Lock-based and Lock-free Taskpool Implementations in Haskell

机译:Haskell中基于锁和无锁的Taskpool实现的比较

获取原文
           

摘要

Today, synchronization of shared data structures in multithreaded software is mostly implemented using locks, which leads to difficult to understand and error-prone programs. Software Transactional Memory allows lock-free concurrent programming by handling the synchronization of shared variables implicitly. We show how to implement different instances of the widely-used taskpool pattern (global and private taskpools with and without task stealing) using both lock-based and lock-free synchronization mechanisms in the functional programming language Haskell. We examine their performance using two synthetic algorithms and LU decomposition and report our observations about parallel performance and the complexity of the implementation. Our results show that lock-free taskpools are not only on par with lock-based implementations concerning parallel performance but are also easier to comprehend and develop.
机译:如今,多线程软件中共享数据结构的同步主要使用锁来实现,这导致程序难以理解且容易出错。软件事务性内存通过隐式处理共享变量的同步,实现了无锁并发编程。我们展示了如何在函数式编程语言Haskell中使用基于锁和无锁的同步机制来实现广泛使用的任务池模式的不同实例(有和没有任务窃取的全局和专用任务池)。我们使用两种综合算法和LU分解检查它们的性能,并报告我们对并行性能和实现复杂性的观察。我们的结果表明,无锁任务池不仅与基于锁的并行性能实现相当,而且更易于理解和开发。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号