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.

4.6.2 Liveness <strong>of</strong> Base<br />

Lemma 13 ensures that whenever a processor intends to execute an instruction, the cache cell<br />

will be set to an appropriate state while the instruction remains in the processor-to-memory<br />

bu er. For a Loadl or Storel, the cache state will be set to Clean or Dirty for a Commit, the<br />

cache state will be set to Clean or Invalid for a Reconcile, the cache state will be set to Dirty<br />

or Invalid.<br />

Lemma 13 Given a Base sequence ,<br />

(1) Loadl(a) 2 Pmb id( ) Loadl(a) 2 Pmb id( ) ^<br />

(Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ))<br />

(2) Storel(a,-) 2 Pmb id( ) Storel(a,-) 2 Pmb id( ) ^<br />

(Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ))<br />

(3) Commit(a) 2 Pmb id( ) Commit(a) 2 Pmb id ( ) ^<br />

(Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( ))<br />

(4) Reconcile(a) 2 Pmb id( ) Reconcile(a) 2 Pmb id( ) ^<br />

(Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( ))<br />

Pro<strong>of</strong> We rst show that when a processor intends to execute an instruction, the cache cell<br />

will be brought to an appropriate state. This can be represented by the following proposition<br />

the pro<strong>of</strong> follows from Lemmas 11 <strong>and</strong> 12.<br />

Loadl(a) 2 Pmb id( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( )<br />

Storel(a,-) 2 Pmb id( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( )<br />

Commit(a) 2 Pmb id ( ) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

Reconcile(a) 2 Pmb id( ) Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

We then show that an instruction can be completed only when the address is cached in an<br />

appropriate state. This can be represented by the following proposition, which can be veri ed<br />

by simplychecking each Base rule.<br />

ht,Loadl(a)i2Pmb id( ) ^ ht,Loadl(a)i =2 Pmb id( )<br />

) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( )<br />

ht,Storel(a,-)i2Pmb id( ) ^ ht,Storel(a,-)i =2 Pmb id( )<br />

) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ Cell(a,-,Dirty) 2 <strong>Cache</strong> id( )<br />

ht,Commit(a)i2Pmb id ( ) ^ ht,Commit(a)i =2 Pmb id( )<br />

) Cell(a,-,Clean) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

ht,Reconcile(a)i2Pmb id( ) ^ ht,Reconcile(a)i =2 Pmb id( )<br />

) Cell(a,-,Dirty) 2 <strong>Cache</strong> id( ) _ a =2 <strong>Cache</strong> id( )<br />

This completes the pro<strong>of</strong> according to Theorem-B (see Section 2.5). 2<br />

Lemma 13 ensures that when a processor intends to execute an instruction, the cache cell will be<br />

brought into an appropriate state so that the instruction can be completed. However, this does<br />

not guarantee that the instruction will be completed since a cache state can change at any time<br />

because <strong>of</strong> voluntary rules. To ensure that each processor makes progress, an instruction must<br />

84

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

Saved successfully!

Ooh no, something went wrong!