Teapot: A Domain-Specific Language for Writing Cache Coherence Protocols

In this paper, we describe Teapot, a domain-specific language for writing cache coherence protocols. Cache coherence is of concern when parallel and distributed systems make local replicas of shared data to improve scalability and performance. In both distributed shared memory systems and distributed file systems, a coherence protocol maintains agreement among the replicated copies as the underlying data are modified by programs running on the system. Cache coherence protocols are notoriously difficult to implement, debug, and maintain. Moreover, protocols are not off-the-shelf, reusable components, because their details depend on the requirements of the system under consideration. The complexity of engineering coherence protocols can discourage users from experimenting with new, potentially more efficient protocols. We have designed and implemented Teapot, a domain-specific language that attempts to address this complexity. Teapot's language constructs, such as a state-centric control structure and continuations, are better suited to expressing protocol code than those of a typical systems programming language. Teapot also facilitates automatic verification of protocols, so hard to find protocol bugs, such as deadlocks, can be detected and fixed before encountering them on an actual execution. We describe the design rationale of Teapot, present an empirical evaluation of the language using two case studies, and relate the lessons that we learned in building a domain-specific language for systems programming.

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

[2]  David Harel,et al.  Statecharts: A Visual Formalism for Complex Systems , 1987, Sci. Comput. Program..

[3]  Michael N. Nelson,et al.  Caching in the Sprite network file system , 1988, TOCS.

[4]  Anoop Gupta,et al.  Memory consistency and event ordering in scalable shared-memory multiprocessors , 1990, [1990] Proceedings. The 17th Annual International Symposium on Computer Architecture.

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

[6]  André Schiper,et al.  Lightweight causal and atomic group multicast , 1991, TOCS.

[7]  D. Culler,et al.  Active Messages: A Mechanism for Integrated Communication and Computation , 1992, [1992] Proceedings the 19th Annual International Symposium on Computer Architecture.

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

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

[10]  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.

[11]  David R. Cheriton,et al.  Understanding the limitations of causally and totally ordered communication , 1994, SOSP '93.

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

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

[14]  Michael Dahlin,et al.  Cooperative caching: using remote client memory to improve file system performance , 1994, OSDI '94.

[15]  J. Larus,et al.  Tempest and Typhoon: user-level shared memory , 1994, Proceedings of 21 International Symposium on Computer Architecture.

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

[17]  Jack W. Davidson,et al.  A Formal Model for Procedure Calling Conventions , 1994 .

[18]  Norman Ramsey,et al.  The New Jersey Machine-Code Toolkit , 1995, USENIX.

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

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

[21]  Jack W. Davidson,et al.  A formal model and specification language for procedure calling conventions , 1995, POPL '95.

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

[23]  James R. Larus,et al.  Parallel Programming in C**: A Large-Grain Data-Parallel Programming Language , 1996 .

[24]  Jeanna Neefe Matthews,et al.  Serverless network file systems , 1996, TOCS.

[25]  Todd A. Proebsting,et al.  Filter fusion , 1996, POPL '96.

[26]  James R. Larus,et al.  Teapot: language support for writing memory coherence protocols , 1996, PLDI '96.

[27]  James R. Larus,et al.  Experience with a Language for Writing Coherence Protocols , 1997, DSL.

[28]  Chengjie Liu,et al.  Maintaining strong cache consistency in the World-Wide Web , 1997, Proceedings of 17th International Conference on Distributed Computing Systems.

[29]  Eric Eide,et al.  Flick: a flexible, optimizing IDL compiler , 1997, PLDI '97.

[30]  Miron Livny,et al.  Transactional client-server cache consistency: alternatives and performance , 1997, TODS.

[31]  Jeannette M. Wing,et al.  A Case study in Model Checking Software Systems , 1997, Sci. Comput. Program..

[32]  Anoop Gupta,et al.  Memory consistency and event ordering in scalable shared-memory multiprocessors , 1990, ISCA '90.

[33]  I. Stravinsky,et al.  Gestural Control of Real-Time Concatenative Synthesis in Luna Park Grégory Beller Computer Music , 2011 .

[34]  Chengjie Liu,et al.  Maintaining Strong Cache Consistency in the World Wide Web , 1998, IEEE Trans. Computers.

[35]  D. Culler,et al.  Active messages: a mechanism for integrating communication and computation , 1998, ISCA '98.

[36]  Barry Wilkinson,et al.  Parallel programming , 1998 .