当前位置: X-MOL 学术Softw. Pract. Exp. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Advanced control‐flow and concurrency in C∀
Software: Practice and Experience ( IF 3.5 ) Pub Date : 2020-12-01 , DOI: 10.1002/spe.2925
Thierry Delisle 1 , Peter A. Buhr 1
Affiliation  

C is a polymorphic, nonobject‐oriented, concurrent, backwards compatible extension of the C programming language. This paper discusses the design philosophy and implementation of its advanced control‐flow and concurrent/parallel features, along with the supporting runtime written in C. These features are created from scratch as ISO C has only low‐level and/or unimplemented concurrency, so C programmers continue to rely on library approaches like pthreads. C introduces modern language‐level control‐flow mechanisms, like generators, coroutines, user‐level threading, and monitors for mutual exclusion and synchronization. The runtime provides significant programmer simplification and safety by eliminating spurious wakeup and monitor barging. The runtime also ensures multiple monitors can be safely acquired in a deadlock‐free way, and this feature is fully integrated with all monitor synchronization mechanisms. All control‐flow features integrate with the C polymorphic type‐system and exception handling, while respecting the expectations and style of C programmers. Experimental results show comparable performance of the new features with similar mechanisms in other concurrent programming languages.

中文翻译:

C∀中的高级控制流和并发

ç 是一个多态的,面向非对象-,同时,向后兼容C编程语言的扩展。本文讨论其先进的控制流和并发/并行特征的设计思想和实施,与写在支持运行时沿Ç 。这些功能是从头开始创建的,因为ISO C仅具有低级和/或未实现的并发性,因此C程序员继续依赖于诸如pthreads之类的库方法。ç 引入了现代语言级别的控制流机制,例如生成器,协程,用户级别的线程以及用于互斥和同步的监视器。运行时通过消除虚假的唤醒和监视器插入来显着简化程序员并提高安全性。运行时还确保可以以无死锁的方式安全地获取多个监视器,并且此功能与所有监视器同步机制完全集成。所有的控制流功能与整合Ç 多态类型系统和异常处理,同时尊重C程序员的期望和风格。实验结果表明,在其他并发编程语言中,具有类似机制的新功能具有可比的性能。
更新日期:2020-12-01
down
wechat
bug