Affiliation:
1. Microsoft Research, Cambridge, United Kingdom
2. Microsoft Research, Mountain View, CA, USA
Abstract
This paper introduces AC, a set of language constructs for composable asynchronous IO in native languages such as C/C++. Unlike traditional synchronous IO interfaces, AC lets a thread issue multiple IO requests so that they can be serviced concurrently, and so that long-latency operations can be overlapped with computation. Unlike traditional asynchronous IO interfaces, AC retains a sequential style of programming without requiring code to use multiple threads, and without requiring code to be "stack-ripped" into chains of callbacks. AC provides an "async" statement to identify opportunities for IO operations to be issued concurrently, a "do..finish" block that waits until any enclosed "async" work is complete, and a "cancel" statement that requests cancellation of unfinished IO within an enclosing "do..finish". We give an operational semantics for a core language. We describe and evaluate implementations that are integrated with message passing on the Barrelfish research OS, and integrated with asynchronous file and network IO on Microsoft Windows. We show that AC offers comparable performance to existing C/C++ interfaces for asynchronous IO, while providing a simpler programming model.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference40 articles.
1. POSIX 1003.1--2008. The Open Group 2008. http://www.opengroup.org/onlinepubs/9699919799/toc.htm. POSIX 1003.1--2008. The Open Group 2008. http://www.opengroup.org/onlinepubs/9699919799/toc.htm.
2. Automatic Mutual Exclusion and Atomicity Checks
3. The multikernel
4. Synchronization primitives for a multiprocessor: a formal specification
Cited by
5 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A concurrency model for JavaScript with cooperative cancellation;Proceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering;2021-10-17
2. Programming with event loops and control loops – From actors to agents;Computer Languages, Systems & Structures;2016-04
3. Lightweight Capability Domains;ACM SIGOPS Operating Systems Review;2016-01-20
4. Lightweight capability domains;Proceedings of the 8th Workshop on Programming Languages and Operating Systems;2015-10-04
5. Afluentes Concurrent I/O Made Easy with Lazy Evaluation;2014 22nd Euromicro International Conference on Parallel, Distributed, and Network-Based Processing;2014-02