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.

A cache sends a <strong>Cache</strong>Req message to the memory whenever it changes the state <strong>of</strong> a<br />

cache cell to <strong>Cache</strong>Pending. Note the <strong>Cache</strong>Req message has no following message when<br />

it is issued.<br />

Cell(a,-,<strong>Cache</strong>Pending) =2 <strong>Cache</strong> id( ) ^ Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( )<br />

) Msg(id ,H,<strong>Cache</strong>Req,a)# 2 Cout id( )<br />

The <strong>Cache</strong>Pending state can only be changed to the Clean state.<br />

Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Cell(a,-,<strong>Cache</strong>Pending) =2 <strong>Cache</strong> id( )<br />

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

Acache cannot send any message to the memory while the cache state is <strong>Cache</strong>Pending.<br />

Thus, a message that has no following message will remain as the last message.<br />

Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ msg# 2 MinCout id( )<br />

) msg# 2 MinCout id( )<br />

We then prove the lemma under the assumption that the cache's outgoing queue contains a<br />

<strong>Cache</strong>Req message which has no following message.<br />

According to Theorem-C <strong>and</strong> Lemma 27,<br />

Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Msg(id ,H,<strong>Cache</strong>Req,a)# 2 Cout id( )<br />

(Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Msg(id ,H,<strong>Cache</strong>Req,a)# 2 Min( )) _<br />

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

According to Theorem-C <strong>and</strong> Lemma 31,<br />

Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Msg(id ,H,<strong>Cache</strong>Req,a)# 2 Min( )<br />

(Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Msg(id ,H,<strong>Cache</strong>Req,a) l 2 Min( )) _<br />

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

According to Lemmas 26, 27, <strong>and</strong> 31,<br />

Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Msg(id ,H,<strong>Cache</strong>Req,a) l 2 Min( )<br />

Msg(H,id ,<strong>Cache</strong>,a,-) 2 MoutCin id( )<br />

Msg(H,id ,<strong>Cache</strong>,a,-) 2 Cin id( )<br />

Msg(H,id ,<strong>Cache</strong>,a,-)" 2 Cin id( )<br />

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

Thus, Cell(a,-,<strong>Cache</strong>Pending) 2 <strong>Cache</strong> id( ) ^ Msg(id ,H,<strong>Cache</strong>Req,a)# 2 Cout id ( )<br />

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

This completes the pro<strong>of</strong> according to Theorem-A. 2<br />

The pro<strong>of</strong> above can be explained in a more intuitive way. A cache generates a <strong>Cache</strong>Req<br />

message each timeitchanges the cache state <strong>of</strong> an address to <strong>Cache</strong>Pending. When the memory<br />

receives a <strong>Cache</strong>Req message from cache id , if the memory state is C[dir] where id =2 dir, the<br />

memory sends a <strong>Cache</strong> message to the cache if the memory state is C[dir] or T[dir,sm] where<br />

id 2 dir, the memory ignores the <strong>Cache</strong>Req message. In the latter case, if the cache state<br />

110

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

Saved successfully!

Ooh no, something went wrong!