arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1203.4751cs.DC
收藏

乐观地促进并发性

Optimism for Boosting Concurrency

Vincent Gramoli, Petr Kuznetsov, Srivatsan Ravi

摘要:

现代并发编程受益于大量的同步技术。这些技术包括传统的悲观锁定,以及基于条件同步原语或事务内存的乐观技术。然而,目前尚不清楚这些方法中哪种更好地利用了多核固有的并发性。在本文中,我们比较的并发水平,可以通过转换一个顺序的程序到一个并发使用乐观或悲观的技术。为了建立这样的实现公平的比较,我们引入了一个新的并发程序的正确性标准,定义独立的同步技术,他们使用。我们将程序的并发性视为其接受并发调度的能力,这是一个受数据库和事务内存理论启发的度量。我们表明,悲观锁可以提供严格更高的并发性比事务的一些应用程序,而事务可以提供严格更高的并发性比悲观锁的其他。最后,我们表明,结合这两种同步技术的好处,可以提供严格的并发性比他们单独。我们提出了一个基于列表的集合算法,在这个意义上,它接受所有正确的并发时间表是最优的。正如我们通过实验所示,并发性方面的最优性反映在可伸缩性方面。

英文摘要:

Modern concurrent programming benefits from a large variety of synchronization techniques. These include conventional pessimistic locking, as well as optimistic techniques based on conditional synchronization primitives or transactional memory. Yet, it is unclear which of these approaches better leverage the concurrency inherent to multi-cores. In this paper, we compare the level of concurrency one can obtain by converting a sequential program into a concurrent one using optimistic or pessimistic techniques. To establish fair comparison of such implementations, we introduce a new correctness criterion for concurrent programs, defined independently of the synchronization techniques they use. We treat a program's concurrency as its ability to accept a concurrent schedule, a metric inspired by the theories of both databases and transactional memory. We show that pessimistic locking can provide strictly higher concurrency than transactions for some applications whereas transactions can provide strictly higher concurrency than pessimistic locks for others. Finally, we show that combining the benefits of the two synchronization techniques can provide strictly more concurrency than any of them individually. We propose a list-based set algorithm that is optimal in the sense that it accepts all correct concurrent schedules. As we show via experimentation, the optimality in terms of concurrency is reflected by scalability gains.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑