首页> 外文会议>International conference on parallel architectures and compilation techniques >Mileage-based Contention Management in Transactional Memory
【24h】

Mileage-based Contention Management in Transactional Memory

机译:交易内存中基于里程的竞争管理

获取原文

摘要

In Transactional Memory (TM), a conflict occurs when a memory block is accessed concurrently by two or more transactions and at least, one of them is a write access. The management of conflicts significantly impacts TM performance. There are two alternative approaches for managing conflicts: Reactive Contention Management (RCM) and Proactive Contention Management (PCM) . Previous contention management schemes treat all transactions with no weights, and make a decision based on the information provided by the running transaction instance. In this work, we suggest that all critical sections (transactions) are not equally performance-critical. Among the transactions from a program, some transactions are more important than others with respect to the performance of the implemented algorithm; e.g., the producer transaction in the producer-consumer relationship. It is worthy to distinguish the performance-critical transactions from others for speeding up the overall execution. For this purpose, we propose a mileage technique and show its effectiveness in the contexts of RCM and PCM. To express the criticality of transactions, we define new instructions, MILEAGE and MRSTCNT. MILEAGE has one operand, mileage id (mid). A mid indicates how far a thread progresses and monotonically increases during the program execution. Each processor has a mileage unit. A mileage unit maintains the current mid and a mileage counter (ment), which tracks the number of times that MILEAGE has been executed with the current mid as its operand. When MILEAGE with a new mid is shown, that mid is stored in the mid register and the ment register is cleared. Every time the same mid appears again, the ment register is incremented. MRSTCNT is used to clear the ment register. When two threads contend with each other, the thread with the smaller mileage value (mid concatenated with ment) receives higher priority. MILEAGE and MRSTCNT were inserted manually based on source code analysis and performance profiling. If a conflict is detected, one of conflicting transactions can continue its execution and the others stall or abort to maintain correctness. Traditional RCMs decide which transaction continues its execution based on information from the current instance. For example, age RCM selects the transaction that has started earlier and size RCM selects the transaction which has accessed more memory blocks. The decision from mileage RCM is based on the relative importance of each transaction from the program flow (mid) as well as dynamic flow (ment). On a conflict, mileage RCM chooses the transaction with the smaller mileage value. From our experiments, mileage RCM provides prominent performance improvements with benchmarks that have performance critical transactions (bayes and intruder). Also, mileage RCM shows no severe speed-down across all the other benchmarks we evaluated. Mileage RCM achieves average speedups of 12.52% over age RCM (23.45% over size RCM). Conflicts can be prevented by throttling the number of concurrently-running transactions. We propose Speculative Lock Insertion (SLI). After a transaction experiences aborts more than three times, it. sets a global lock upon restart. If the transaction which holds the global lock commits, it resets the global lock. Every time a thread encounters a transaction, it first checks the global lock. If the global lock is set, the thread waits until it is released before starting a transaction. Otherwise, the transaction executes. In mileage-based SLI, the aborted transaction not only sets the global lock but also registers its mileage value. When a thread finds the lock is set, it compares its mileage value to that in the global location. If it has the smaller value, it starts execution, ignoring the lock. Because locking in SLI is for performance only, this does not impact correctness issues. The correctness is still maintained by the underlying TM system. From our experiments, mileage-based SLI achieves average speedups of 9.55%, over Adaptive Transaction Scheduling .
机译:在事务性内存(TM)中,当两个或多个事务同时访问一个内存块并且其中至少一个是写访问时,就会发生冲突。冲突的管理会显着影响TM的性能。存在两种用于管理冲突的替代方法:反应式竞争管理(RCM)和主动式竞争管理(PCM)。先前的竞争管理方案将不加权重地对待所有事务,并根据正在运行的事务实例提供的信息做出决策。在这项工作中,我们建议所有关键部分(事务)对性能的要求都不相同。在程序的事务中,就实现的算法的性能而言,某些事务比其他事务更重要。例如,生产者-消费者关系中的生产者交易。值得将性能关键事务与其他事务区分开来加快整体执行速度。为此,我们提出一种里程技术,并在RCM和PCM的背景下证明其有效性。为了表达交易的重要性,我们定义了新的指令MILEAGE和MRSTCNT。 MILEAGE有一个操作数,里程ID(中)。中点表示线程在程序执行过程中前进和单调增加的程度。每个处理器都有一个里程单位。里程单位维护当前的中数和里程计数器(ment),该计数器跟踪以当前中数作为其操作数执行MILEAGE的次数。当显示带有新中点的MILEAGE时,该中点将存储在中值寄存器中,并且清除ment寄存器。每当相同的中点再次出现时,ment寄存器就会增加。 MRSTCNT用于清除寄存器。当两个线程相互竞争时,里程值较小(与ment串联)的线程将获得较高的优先级。根据源代码分析和性能分析,手动插入了MILEAGE和MRSTCNT。如果检测到冲突,则有冲突的事务之一可以继续执行,而其他事务则暂停或中止以保持正确性。传统RCM根据当前实例中的信息来决定哪个事务继续执行。例如,age RCM选择较早开始的事务,而大小RCM选择已访问更多内存块的事务。里程RCM的决定基于程序流(中)和动态流(ment)中每个事务的相对重要性。在发生冲突时,里程RCM选择里程值较小的交易。根据我们的实验,mileage RCM通过具有关键性能交易(贝叶斯和入侵者)的基准,显着提高了性能。此外,在我们评估的所有其他基准测试中,里程RCM均未显示严重降低速度。里程RCM与年龄RCM相比平均提高了12.52%(与尺寸RCM相比提高了23.45%)。可以通过限制同时运行的事务的数量来防止冲突。我们建议使用推测性锁插入(SLI)。事务经历中止超过三遍后,它就会终止。重新启动时设置全局锁定。如果持有全局锁的事务提交,它将重置全局锁。每当线程遇到事务时,它都会首先检查全局锁。如果设置了全局锁,则线程将等待直到释放它,然后再开始事务。否则,事务将执行。在基于里程的SLI中,中止的事务不仅会设置全局锁定,还会注册其里程值。当线程发现设置了锁定时,它将其里程值与全局位置的里程值进行比较。如果值较小,则开始执行,而忽略锁。因为锁定SLI仅是为了提高性能,所以这不会影响正确性问题。底层TM系统仍保持正确性。根据我们的实验,基于里程的SLI比Adaptive Transaction Scheduling的平均速度提高了9.55%。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号