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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

M-engine Rules<br />

Msg from id Mstate Action Next Mstate<br />

h<strong>Cache</strong>Req,ai Cell(a,v,C[dir,hint]) (id =2 dir) h<strong>Cache</strong>,a,vi!id Cell(a,v,C[id jdir,hint]) SF<br />

Cell(a,v,C[dir,hint]) (id 2 dir) Cell(a,v,C[dir,hint])<br />

Cell(a,v,T[dir,sm,hint]) (id =2 dir) stall message Cell(a,v,T[dir,sm,hint])<br />

Cell(a,v,T[dir,sm,hint]) (id 2 dir) Cell(a,v,T[dir,sm,hint])<br />

hWb,a,vi Cell(a,v1,C[id jdir,hint]) hPurgeReq,ai!dir Cell(a,v1,T[dir,(id ,v),hint])<br />

Cell(a,v1,T[id jdir,sm,hint]) Cell(a,v1,T[dir,(id ,v)jsm,hint])<br />

hPurge,ai Cell(a,v,C[id jdir,hint]) Cell(a,v,C[dir,hint])<br />

Cell(a,v,T[id jdir,sm,hint]) Cell(a,v,T[dir,sm,id jhint])<br />

Cell(a,-,T[ ,(id ,v)jsm,hint]) hFlushAck,ai!id Cell(a,v,T[ ,sm,id jhint])<br />

Cell(a,-,T[ ,(id ,v),hint]) hWbAck,ai!id Cell(a,v,C[id ,hint])<br />

Cell(a,v,T[ , ,hint]) Cell(a,v,C[ ,hint])<br />

Cell(a,v,C[dir,id jhint]) (id =2 dir) h<strong>Cache</strong>,a,vi!id Cell(a,v,C[id jdir,hint])<br />

Cell(a,v,C[dir,id jhint]) Cell(a,v,C[dir,hint])<br />

Cell(a,v,T[dir,sm,id jhint]) Cell(a,v,T[dir,sm,hint])<br />

Figure 5.10: Memory Engine Rules <strong>of</strong> an Update Protocol<br />

5.6 An Update Protocol from WP<br />

The WP protocol contains voluntary rules that can be invoked under various heuristic policies.<br />

Di erent heuristic policies can lead to di erent performance, but the soundness <strong>and</strong> liveness <strong>of</strong><br />

the system are always guaranteed. To build a concrete adaptive protocol one has to decide only<br />

on the conditions in which eachvoluntary rule should be applied. This policy decision is taken<br />

on the basis <strong>of</strong> an expected or observed behavior <strong>of</strong> the program.<br />

To demonstrate the use <strong>of</strong> voluntary rules, we build an update protocol from WP. The<br />

memory maintains some hueristic information about the cache sites that may need to be up-<br />

dated. It behaves as a hint for the invocation <strong>of</strong> the voluntary rule that sends a data copy to<br />

a cache site even though no cache request is received. The heuristic information is called s<strong>of</strong>t<br />

state since it has no impact on the soundness <strong>and</strong> liveness <strong>of</strong> the protocol.<br />

Figure 5.10 gives the M-engine rules for the update protocol (the processor <strong>and</strong> C-engine<br />

rules remain unchanged). When the memory receives a purge acknowledgment, it records the<br />

cache identi er as a hint for future cache update. Later when the memory is updated, it can<br />

send a data copy to the cache site in which the address was just purged. Note that a cache<br />

identi er in the heuristic information can be removed at any time without taking any action.<br />

The correctness <strong>of</strong> the update protocol follows from two observations. First, with all the<br />

heuristic information removed, each rule <strong>of</strong> the update protocol can be projected to either<br />

a m<strong>and</strong>atory or voluntary rule <strong>of</strong> WP, or a rule that takes no action (that is, the rule has<br />

identical left-h<strong>and</strong>-side <strong>and</strong> right-h<strong>and</strong>-side). This guarantees the soundness <strong>of</strong> the protocol.<br />

Second, the action <strong>of</strong> each m<strong>and</strong>atory rule <strong>of</strong> WP can be invoked under the same condition in<br />

the update protocol, that is, its applicability isnotcontingent uponany heuristic information.<br />

This guarantees the liveness <strong>of</strong> the protocol.<br />

113

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

Saved successfully!

Ooh no, something went wrong!