arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1301.0748cs.PL
收藏

libcppa -为C++11设计Actor语义

libcppa - Designing an Actor Semantic for C++11

Dominik Charousset, Thomas C. Schmidt

摘要:

并行硬件使得并发性对于高效的程序执行是强制性的。然而,编写并发软件既具有挑战性又容易出错。C++11为多道程序设计提供了标准的工具,例如带有获取/释放语义的原子操作和RAII互斥锁,但这些原语仍然太低级。正确有效地使用它们仍然需要专业知识和手工制作。参与者模型通过使用显式消息传递机制共享来取代隐式通信。它适用于并发和分布,并且在适当的预确定尺寸的线程池中调度所有参与者的轻量级参与者模型实现可以优于等效的基于线程的应用程序。然而,演员模型没有进入本机程序设计语言的领域,除了供应商特定的岛屿解决方案。通过开源库libcppa,我们希望将Actor模型提供的构建可靠分布式系统的能力与C++11的性能和资源效率相结合。

英文摘要:

Parallel hardware makes concurrency mandatory for efficient program execution. However, writing concurrent software is both challenging and error-prone. C++11 provides standard facilities for multiprogramming, such as atomic operations with acquire/release semantics and RAII mutex locking, but these primitives remain too low-level. Using them both correctly and efficiently still requires expert knowledge and hand-crafting. The actor model replaces implicit communication by sharing with an explicit message passing mechanism. It applies to concurrency as well as distribution, and a lightweight actor model implementation that schedules all actors in a properly pre-dimensioned thread pool can outperform equivalent thread-based applications. However, the actor model did not enter the domain of native programming languages yet besides vendor-specific island solutions. With the open source library libcppa, we want to combine the ability to build reliable and distributed systems provided by the actor model with the performance and resource-efficiency of C++11.

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

↑