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.
- POSIX 1003.1--2008. The Open Group, 2008. http://www.opengroup.org/onlinepubs/9699919799/toc.htm.Google Scholar
- M. Abadi. Automatic mutual exclusion and atomicity checks. In Concurrency, Graphs and Models: Essays Dedicated to Ugo Montanari on the Occasion of His 65th Birthday, pages 510--526. Springer-Verlag, 2008. Google Scholar
Digital Library
- A. Adya, J. Howell, M. Theimer, W. J. Bolosky, and J. R. Douceur. Cooperative task management without manual stack management. In USENIX-02: Proc. 2002 Annual Technical Conference, pages 289--302, 2002. Google Scholar
Digital Library
- A. Baumann, P. Barham, P.-E. Dagand, T. Harris, R. Isaacs, S. Peter, T. Roscoe, A. Schüpbach, and A. Singhania. The multikernel: a new OS architecture for scalable multicore systems. In SOSP '09: Proc. 22nd Symposium on Operating Systems Principles, pages 29--44, 2009. Google Scholar
Digital Library
- A. Birrell, J. Guttag, J. Horning, and R. Levin. Synchronization primitives for a multiprocessor: a formal specification. In SOSP '87: Proc. 11th Symposium on Operating Systems Principles, pages 94--102, 1987. Google Scholar
Digital Library
- P. Chandrasekaran, C. L. Conway, J. M. Joy, and S.K. Rajamani. Programming asynchronous layers with CLARITY. In ESEC-FSE '07: Proc. 6th European Software Engineering Conference & Symposium on the Foundations of Software Engineering, pages 65--74, 2007. Google Scholar
Digital Library
- P. Charles, C. Grothoff, V. Saraswat, C. Donawa, A. Kielstra, K. Ebcioglu, C. von Praun, and V. Sarkar. X10: an object-oriented approach to non-uniform cluster computing. In OOPSLA '05: Proc. 20th Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 519--538, 2005. Google Scholar
Digital Library
- R. Cunningham and E. Kohler. Making events less slippery with eel. In HotOS '05: Proc. 10th Conference on Hot Topics in Operating Systems, 2005. Google Scholar
Digital Library
- F. Dabek, N. Zeldovich, F. Kaashoek, D. Mazières, and R. Morris. Event-driven programming for robust software. In Proc. 10th ACM SIGOPS European Workshop, pages 186--189, 2002. Google Scholar
Digital Library
- A. Dunkels, O. Schmidt, T. Voigt, and M. Ali. Protothreads: simplifying event-driven programming of memory-constrained embedded systems. In SenSys '06: Proc. 4th Conference on Embedded Networked Sensor Systems, pages 29--42, 2006. Google Scholar
Digital Library
- K. Elmeleegy, A. Chanda, A. L. Cox, and W. Zwaenepoel. Lazy asynchronous I/O for event-driven servers. In USENIX-04: Proc. 2004 Annual Technical Conference, pages 21--21, 2004. Google Scholar
Digital Library
- J. Fischer, R. Majumdar, and T. Millstein. Tasks: language support for event-driven programming. In PEPM '07: Proc. 2007 Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 134--143, 2007. Google Scholar
Digital Library
- M. Frigo, C.E. Leiserson, and K.H. Randall. The implementation of the Cilk-5 multithreaded language. In PLDI '98: Proc. 1998 Conference on Programming Language Design and Implementation, pages 212--223, 1998. Google Scholar
Digital Library
- S. C. Goldstein. Lazy Threads Compiler and Runtime Structures for Fine-Grained Parallel Programming. PhD thesis, University of California--Berkeley, Berkeley, 1997. Google Scholar
Digital Library
- P. Haller and M. Odersky. Scala actors: Unifying thread-based and event-based programming. Theor. Comput. Sci., 410(2--3):202--220, 2009. Google Scholar
Digital Library
- E. A. Hauck and B. A. Dent. Burroughs' B6500/B7500 stack mechanism. In AFIPS '68: Proc. of the Spring Joint Computer Conference, pages 245--251, 1968. Google Scholar
Digital Library
- C. A. R. Hoare. Communicating sequential processes. Commun. ACM, 21(8):666--677, 1978. Google Scholar
Digital Library
- Intel Corporation. Single-chip cloud computer. http://techresearch.intel.com/articles/Tera-Scale/1826.htm, December 2009.Google Scholar
- M. Isard and A. Birrell. Automatic mutual exclusion. In HotOS '07: Proc. 11th Workshop on Hot Topics in Operating Systems, 2007. Google Scholar
Digital Library
- J. Howard et al. A 48-core IA-32 message-passing processor with DVFS in 45nm CMOS. In ISSCC '10: Proc. Solid-State Circuits Conference, pages 108--109, 2010.Google Scholar
- G. Kerneis and J. Chroboczek. CPC: programming with a massive number of lightweight threads. In PLACES '11: Proc. Workshop on Programming Language Approaches to Concurrency and Communication-Centric Software, 2011.Google Scholar
- M. Krohn, E. Kohler, and M. F. Kaashoek. Events can make sense. In USENIX-07: Proc. 2007 Annual Technical Conference, pages 1--14, 2007. Google Scholar
Digital Library
- H. C. Lauer and R. M. Needham. On the duality of operating system structures. In Proc. 2nd International Symposium on Operating Systems, IRIA, 1978.Google Scholar
- J.K. Lee and J. Palsberg. Featherweight X10: a core calculus for async-finish parallelism. In PPoPP '10: Proc. 15th Symposium on Principles and Practice of Parallel Programming, pages 25--36, 2010. Google Scholar
Digital Library
- P. Li and S. Zdancewic. Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives. In PLDI '07: Proc. 2007 Conference on Programming Language Design and Implementation, pages 189--199, 2007. Google Scholar
Digital Library
- E. Mohr, D. A. Kranz, and R. H. Halstead, Jr. Lazy task creation: A technique for increasing the granularity of parallel programs. IEEE Trans. Parallel Distrib. Syst., 2:264--280, 1991. Google Scholar
Digital Library
- J. Ousterhout. Why threads are a bad idea (for most purposes). Presentation given at the 1996 Usenix Annual Technical Conference.Google Scholar
- J. H. Reppy. Concurrent Programming in ML. Cambridge University Press, Cambridge, England, 1999. Google Scholar
Digital Library
- K. C. Sivaramakrishnan, L. Ziarek, R. Prasad, and S. Jagannathan. Lightweight asynchrony using parasitic threads. In DAMP '10: Proc. 2010 Workshop on Declarative Aspects of Multicore Programming, 2010. Google Scholar
Digital Library
- Y. Smaragdakis, A. Kay, R. Behrends, and M. Young. Transactions with isolation and cooperation. In OOPSLA '07: Proc. 22nd Conference on Object Oriented Programming Systems and Applications, pages 191--210, 2007. Google Scholar
Digital Library
- S. Srinivasan and A. Mycroft. Kilim: Isolation-typed actors for Java. In ECOOP '08: Proc. 22nd European Conference on Object-Oriented Programming, pages 104--128, 2008. Google Scholar
Digital Library
- D. Syme, T. Petricek, and D. Lomov. The F# asynchronous programming model. In PADL '11: Proc. 13th International Symposium on Practical Aspects of Declarative Languages, 2011. Google Scholar
Digital Library
- K. Taura, K. Tabata, and A. Yonezawa. StackThreads/MP: integrating futures into calling standards. In PPoPP '99: Proc. 7th Symposium on Principles and Practice of Parallel Programming, pages 60--71, 1999. Google Scholar
Digital Library
- C. Thacker. Beehive: A many-core computer for FPGAs (v5). MSR Silicon Valley, January 2010. http://projects.csail.mit.edu/beehive/BeehiveV5.pdf.Google Scholar
- R. von Behren, J. Condit, and E. Brewer. Why events are a bad idea (for high-concurrency servers). In HotOS '03: Proc. 9th Conference on Hot Topics in Operating Systems, 2003. Google Scholar
Digital Library
- R. von Behren, J. Condit, F. Zhou, G. C. Necula, and E. Brewer. Capriccio: scalable threads for internet services. In SOSP '03: Proc. 19th Symposium on Operating Systems Principles, pages 268--281, 2003. Google Scholar
Digital Library
- J. Vouillon. Lwt: a cooperative thread library. In ML '08: Proc. 2008 Workshop on ML, pages 3--12, 2008. Google Scholar
Digital Library
- D. Wentzlaff, C. Gruenwald III, N. Beckmann, K. Modzelewski, A. Belay, L. Youseff, J. Miller, and A. Agarwal. An operating system for multicore and clouds: Mechanisms and implementation. In SOCC '10: Proc. 2010 Symposium on Cloud Computing, pages 3--14, June 2010. Google Scholar
Digital Library
- P. Winterbottom. Alef language reference manual. Technical report, Bell Labs, 1995.Google Scholar
- L. Ziarek, K. C. Sivaramakrishnan, and S. Jagannathan. Composable asynchronous events. In PLDI '11: Proc. 2011 Conference on Programming Language Design and Implementation, pages 628--639, June 2011. Google Scholar
Digital Library
Index Terms
AC: composable asynchronous IO for native languages
Recommendations
AC: composable asynchronous IO for native languages
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsThis 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, ...
Implementation and performance of a parallel file system for high performance distributed applications
HPDC '96: Proceedings of the 5th IEEE International Symposium on High Performance Distributed ComputingDedicated cluster parallel computers (DCPCs) are emerging as low-cost high performance environments for many important applications in science and engineering. A significant class of applications that perform well on a DCPC are coarse-grain applications ...
Lightweight asynchrony using parasitic threads
DAMP '10: Proceedings of the 5th ACM SIGPLAN workshop on Declarative aspects of multicore programmingMessage-passing is an attractive thread coordination mechanism because it cleanly delineates points in an execution when threads communicate, and unifies synchronization and communication: a sender is allowed to proceed only when a receiver willing to ...







Comments