09.08.2013 Views

Design and Verification of Adaptive Cache Coherence Protocols ...

Design and Verification of Adaptive Cache Coherence Protocols ...

Design and Verification of Adaptive Cache Coherence Protocols ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

although various techniques have been proposed to reduce the state space.<br />

While nite-state veri ers can be used for initial sanity checking on small scale examples,<br />

theorem provers can be <strong>of</strong> great help for veri cation <strong>of</strong> sophisticated protocols. Akhiani et al.<br />

[7] employed a hierarchical pro<strong>of</strong> technique to verify sophisticated cache coherence protocols for<br />

the Alpha memory model. The protocols are speci ed in TLA+ [74, 75], a formal speci cation<br />

language based on rst-order logic <strong>and</strong> set theory. Plakal et al. [31, 100] proposed a technique<br />

based on Lamport's logical clocks that can be used to reason about cache coherence protocols.<br />

The method associates a counter with each host <strong>and</strong> provides a time-stamping scheme that to-<br />

tally orders all protocol events. The total order can then be used to verify that the requirements<br />

<strong>of</strong> speci c memory models are satis ed.<br />

Most protocol veri cation methods verify certain invariants for cache coherence protocols.<br />

However, it is <strong>of</strong>ten di cult to determine all the necessary invariants in a systematic manner,<br />

especially for sophisticated protocols that implement relaxed memory models <strong>and</strong> incorporate<br />

various optimizations. While some invariants are obvious (for example, two caches at the same<br />

level should not contain the same address in the exclusive statesimultaneously), many others<br />

are motivated by particular protocol implementations instead <strong>of</strong> the speci cations <strong>of</strong> memory<br />

models. Sometimes it is not even clear if the chosen invariants are necessary or su cient for the<br />

correctness. This means that for the same memory model, we mayhave toprove very di erent<br />

properties for di erent implementations. Therefore, these techniques are more like a bag <strong>of</strong><br />

useful tools for debugging cache coherence protocols, rather than for verifying them.<br />

The di culty <strong>of</strong>protocol veri cation with current approaches can be largely attributed to<br />

the fact that protocols are designed <strong>and</strong> veri ed separately. In our approach, both the memory<br />

model <strong>and</strong> the protocol are expressed in the same formalism, <strong>and</strong> there is a notion that one<br />

system implements another. We begin with the operational speci cation <strong>of</strong> the memory model,<br />

<strong>and</strong> then develop protocols using the Imperative-&-Directive design methodology. <strong>Protocols</strong><br />

are designed <strong>and</strong> veri ed iteratively throughout the successive process. The invariants that<br />

need to be veri ed usually show up systematically as lemmas that can be veri ed by induction<br />

<strong>and</strong> case analysis on rewriting rules.<br />

1.3 Contributions <strong>of</strong> the Thesis<br />

This thesis presents a mechanism-oriented memory model <strong>and</strong> associated adaptive cache coher-<br />

ence protocols that implement the memory model for DSM systems. The major contributions<br />

<strong>of</strong> the thesis are as follows:<br />

Using TRSs to model computer architectures <strong>and</strong> distributed protocols. TRSs o er a<br />

convenient way to describe asynchronous systems <strong>and</strong> can be used to prove the correct-<br />

ness <strong>of</strong> an implementation with respect to a speci cation. To prove its soundness, the<br />

speci cation is shown to be able to simulate the implementation with respect to a map-<br />

ping function based on the notion <strong>of</strong> drained terms. To prove its liveness, temporal logic<br />

is employed to reason about time-varying behaviors <strong>of</strong> TRSs.<br />

23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!