Teapot: language support for writing memory coherence protocols

Recent shared-memory parallel computer systems offer the exciting possibility of customizing memory coherence protocols to fit an application's semantics and sharing patterns. Custom protocols have been used to achieve message-passing performance---while retaining the convenient programming model of a global address space---and to implement high-level language constructs. Unfortunately, coherence protocols written in a conventional language such as C are difficult to write, debug, understand, or modify. This paper describes Teapot, a small, domain-specific language for writing coherence protocols. Teapot uses continuations to help reduce the complexity of writing protocols. Simple static analysis in the Teapot compiler eliminates much of the overhead of continuations and results in protocols that run nearly as fast as hand-written C code. A Teapot specification can be compiled both to an executable coherence protocol and to input for a model checking system, which permits the specification to be verified. We report our experiences coding and verifying several protocols written in Teapot, along with measurements of the overhead incurred by writing a protocol in a higher-level language.

[1]  Henri E. Bal,et al.  Orca: a language for distributed programming , 1990, SIGP.

[2]  Daniel P. Friedman,et al.  Engines build process abstractions , 1984, LFP '84.

[3]  James R. Larus,et al.  Tempest: a substrate for portable parallel programs , 1995, Digest of Papers. COMPCON'95. Technologies for the Information Superhighway.

[4]  Jeannette M. Wing,et al.  Model checking software systems: a case study , 1995, SIGSOFT FSE.

[5]  Ruby B. Lee,et al.  Tempest: a substrate for portable parallel programs , 1995 .

[6]  Mitchell Wand,et al.  Continuation-Based Multiprocessing , 1980, High. Order Symb. Comput..

[7]  Michel Dubois,et al.  A New Approach for the Verification of Cache Coherence Protocols , 1995, IEEE Trans. Parallel Distributed Syst..

[8]  Takashi Masuda,et al.  A framework for customizing coherence protocols of distributed file caches , 1996, Proceedings of 16th International Conference on Distributed Computing Systems.

[9]  Willy Zwaenepoel,et al.  Implementation and performance of Munin , 1991, SOSP '91.

[10]  James R. Larus,et al.  Tempest and typhoon: user-level shared memory , 1994, ISCA '94.

[11]  Martin Peschke,et al.  Design and Validation of Computer Protocols , 2003 .

[12]  M. Hill,et al.  Weak ordering-a new definition , 1990, [1990] Proceedings. The 17th Annual International Symposium on Computer Architecture.

[13]  BerryGérard,et al.  The ESTEREL synchronous programming language , 1992 .

[14]  Alan J. Hu,et al.  Protocol verification as a hardware design aid , 1992, Proceedings 1992 IEEE International Conference on Computer Design: VLSI in Computers & Processors.

[15]  Katherine Yelick,et al.  Multipol: A Distributed Data Structure Library , 1995 .

[16]  James R. Larus,et al.  Where is time spent in message-passing and shared-memory programs? , 1994, ASPLOS VI.

[17]  Kirk L. Johnson,et al.  CRL: high-performance all-software distributed shared memory , 1995, SOSP.

[18]  Anoop Gupta,et al.  The Stanford Dash multiprocessor , 1992, Computer.

[19]  Anoop Gupta,et al.  The Stanford FLASH multiprocessor , 1994, ISCA '94.

[20]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[21]  Mitchell Wand,et al.  Continuations and coroutines , 1984, LFP '84.

[22]  James R. Larus,et al.  LCM: memory system support for parallel language implementation , 1994, ASPLOS VI.

[23]  James R. Larus,et al.  Application-specific protocols for user-level shared memory , 1994, Proceedings of Supercomputing '94.

[24]  Paul Hudak,et al.  Memory coherence in shared virtual memory systems , 1989, TOCS.

[25]  Brian N. Bershad,et al.  Using continuations to implement thread management and communication in operating systems , 1991, SOSP '91.

[26]  Chung-Shyan Liu,et al.  An object-based approach to protocol software implementation , 1994, SIGCOMM.

[27]  Wilson C. Hsieh,et al.  Optimistic active messages: a mechanism for scheduling communication with computation , 1995, PPOPP '95.

[28]  Gérard Berry,et al.  The Esterel Synchronous Programming Language: Design, Semantics, Implementation , 1992, Sci. Comput. Program..

[29]  James R. Larus,et al.  Fine-grain access control for distributed shared memory , 1994, ASPLOS VI.

[30]  Edmund M. Clarke,et al.  Model checking and abstraction , 1994, TOPL.