USENIX 2002 Annual Conference - Technical Program Abstract
Cooperative Task Management without Manual Stack Management
or, Event-driven Programming is Not the Opposite of Threaded Programming
Atul Adya, Jon Howell, Marvin Theimer, William J. Bolosky, John R. Douceur,
Microsoft Research
Abstract
Cooperative task management can provide program architects with
ease of reasoning about concurrency issues.
This property is often espoused by those who recommend ``event-driven''
programming over ``multithreaded'' programming.
Those terms conflate several issues.
In this paper, we clarify the issues, and show how one can get the best of
both worlds: reason more simply about concurrency in the way
``event-driven'' advocates recommend, while preserving the readability
and maintainability of code associated with ``multithreaded'' programming.
We identify the source of confusion about the two programming styles
as a conflation of two concepts:
task management and stack management.
Those two concerns define a two-axis space in which ``multithreaded''
and ``event-driven'' programming are diagonally opposite; there is a
third ``sweet spot'' in the space that combines the advantages of both
programming styles.
We point out pitfalls in both alternative forms of stack management,
manual and automatic,
and we supply techniques that mitigate the danger in the automatic case.
Finally, we exhibit adaptors that enable automatic stack management
code and manual stack management code to interoperate in the same code base.
- View the full text of this paper in
HTML,
PDF, and
PostScript.
The Proceedings are published as a collective work, © 2002 by the USENIX Association. All Rights Reserved. Rights
to individual papers remain with the author or the author's employer.
Permission is granted for the noncommercial reproduction of the complete
work for educational or research purposes. USENIX acknowledges all
trademarks within this paper.
- If you need the latest Adobe Acrobat Reader, you can download it from Adobe's site.
- To become a USENIX Member, please see our Membership Information.
|