arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1406.3485cs.PLcs.DCcs.SE
收藏

面向可组合的并发抽象

Towards Composable Concurrency Abstractions

Janwillem Swalens, Stefan Marr, Joeri De Koster, Tom Van Cutsem

摘要:

在过去的几十年中,已经提出了许多不同的编程模型来管理应用程序中的并发性,例如Actor模型,通信顺序进程和软件事务存储器。多核处理器的普及使得利用并发变得更加重要。我们观察到,现代语言,如Scala、Clojure或F#,提供的不是一个,而是多个并发模型,帮助开发人员管理并发。大型最终用户应用程序很少只使用单一并发模型构建。程序员需要管理响应式UI、处理文件或网络I/O、异步工作流和共享资源。不同的并发模型支持不同的需求。这就提出了这些并发模型如何交互以及它们是否可组合的问题。毕竟,组合不同的并发模型可能会导致微妙的错误或不一致。在本文中,我们对Clojure语言提供的并发抽象进行了深入的研究。我们研究所有的成对组合的抽象,注意哪些组成没有问题,哪些没有。我们试图从Clojure的细节中抽象出来,识别并发模型的一般属性,这些属性促进或阻碍了组合。

英文摘要:

In the past decades, many different programming models for managing concurrency in applications have been proposed, such as the actor model, Communicating Sequential Processes, and Software Transactional Memory. The ubiquity of multi-core processors has made harnessing concurrency even more important. We observe that modern languages, such as Scala, Clojure, or F#, provide not one, but multiple concurrency models that help developers manage concurrency. Large end-user applications are rarely built using just a single concurrency model. Programmers need to manage a responsive UI, deal with file or network I/O, asynchronous workflows, and shared resources. Different concurrency models facilitate different requirements. This raises the issue of how these concurrency models interact, and whether they are composable. After all, combining different concurrency models may lead to subtle bugs or inconsistencies. In this paper, we perform an in-depth study of the concurrency abstractions provided by the Clojure language. We study all pairwise combinations of the abstractions, noting which ones compose without issues, and which do not. We make an attempt to abstract from the specifics of Clojure, identifying the general properties of concurrency models that facilitate or hinder composition.

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

↑