首页> 外文会议>Annual ACM SIGPLAN-SIGACT symposium on principles of programming languages >Laws of Order: Expensive Synchronization in Concurrent Algorithms Cannot be Eliminated
【24h】

Laws of Order: Expensive Synchronization in Concurrent Algorithms Cannot be Eliminated

机译:顺序定律:并发算法中的昂贵同步无法消除

获取原文

摘要

Building correct and efficient concurrent algorithms is known to be a difficult problem of fundamental importance. To achieve efficiency, designers try to remove unnecessary and costly synchronization. However, not only is this manual trial-and-error process ad-hoc, time consuming and error-prone, but it often leaves designers pondering the question of: is it inherently impossible to eliminate certain synchronization, or is it that I was unable to eliminate it on this attempt and I should keep trying? In this paper we respond to this question. We prove that it is impossible to build concurrent implementations of classic and ubiquitous specifications such as sets, queues, stacks, mutual exclusion and read-modify-write operations, that completely eliminate the use of expensive synchronization. We prove that one cannot avoid the use of either: i) read-after-write (RAW), where a write to shared variable A is followed by a read to a different shared variable B without a write to B in between, or ii) atomic write-after-read (AWAR). where an atomic operation reads and then writes to shared locations. Unfortunately, enforcing RAW or AWAR is expensive on all current mainstream processors. To enforce RAW. memory ordering-also called fence or barrier-instructions must be used. To enforce AWAR. atomic instructions such as compare-and-swap are required. However, these instructions are typically substantially slower than regular instructions. Although algorithm designers frequently struggle to avoid RAW and AWAR, their attempts are often futile. Our result characterizes the cases where avoiding RAW and AWAR is impossible. On the flip side, our result can be used to guide designers towards new algorithms where RAW and AWAR can be eliminated.
机译:已知构建正确和高效的并发算法是重要的重要性问题。为了实现效率,设计人员试图消除不必要的和昂贵的同步。但是,不仅是本手动试验和错误过程的ad-hoc,耗时和容易出错,但它往往会使设计人员思考的问题:它本质上是不可能消除某些同步,还是我无法使用为了消除这种尝试,我应该继续尝试?在本文中,我们回答了这个问题。我们证明不可能建立经典和无处不在的规范的并发实现,例如集合,队列,堆栈,相互排除和读取修改写入操作,这些规范完全消除了昂贵同步的使用。我们证明了一个人无法避免使用:i)读写写入(RAW),其中写入到共享变量A后跟读取到不同的共享变量B,没有写入b之间的写入或II )原子写入读(AWAR)。其中原子操作读取然后写入共享位置。不幸的是,在所有当前主流处理器上强制执行RAW或AWAR是昂贵的。强制执行原始。必须使用内存订购 - 也称为栅栏或障碍指令。强制执行A​​war。需要比较和交换等原子指示。然而,这些指令通常比常规指令较慢。虽然算法设计师经常挣扎以避免原始和AWAR,但他们的尝试通常是徒劳的。我们的结果表征了避免原始和Awar的情况是不可能的。在翻盖方面,我们的结果可用于指导设计人员朝着可以消除RAW和AWAR的新算法。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号