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.

5.4.4 Soundness <strong>of</strong> WP<br />

The WP protocol de ned in Figure 5.5 consists <strong>of</strong> integrated rules that can be derived from<br />

the imperative <strong>and</strong> directive rules <strong>of</strong> WP. The imperative rules are given in Section 5.2. In<br />

the remainder <strong>of</strong> this section, we give the directive rules <strong>and</strong> show the derivation <strong>of</strong> WP rules.<br />

A directive rule involves generating or discarding a directive message, which can be used to<br />

specify conditions under which an imperative action should be invoked.<br />

C-Send-<strong>Cache</strong>Req Rule<br />

Site(id , cache, in, out, pmb, mpb, proc)<br />

! Site(id , cache, in, out Msg(id ,H,<strong>Cache</strong>Req,a), pmb, mpb, proc)<br />

C-Receive-PurgeReq Rule<br />

Site(id , cache, Msg(H,id ,PurgeReq,a) in, out, pmb, mpb, proc)<br />

! Site(id , cache, in, out, pmb, mpb, proc)<br />

M-Send-PurgeReq Rule<br />

Msite(mem, in, out)<br />

! Msite(mem, in, out Msg(H,id ,PurgeReq,a))<br />

M-Receive-<strong>Cache</strong>Req Rule<br />

Msite(mem, Msg(id ,H,<strong>Cache</strong>Req,a) in, out)<br />

! Msite(mem, in, out)<br />

Figure 5.9 gives the imperative <strong>and</strong> directive rules used in the derivation for each WP rule (a<br />

rule marked with ` 'may be applied zero or many times). In the derivation, the <strong>Cache</strong>Pending<br />

state used in the integrated rules is mapped to the Invalid state <strong>of</strong> the imperative rules, <strong>and</strong><br />

the C[dir] state used in the integrated rules is mapped to the T[dir, ] state <strong>of</strong> the imperative<br />

rules. For example, consider Rule MM5 that deals with an incoming writeback message. It<br />

involves applying the imperative M-Receive-Wb rule to suspend the writeback message, <strong>and</strong><br />

the directive M-Send-PurgeReq rule to generate purge requests.<br />

A directive rule by itself cannot modify any system state that may a ect soundness. There-<br />

fore, it su ces to verify the soundness <strong>of</strong> the protocol with respect to the imperative rules, rather<br />

than the integrated rules. This can dramatically simplify the veri cation since the number <strong>of</strong><br />

imperative rules is much smaller than the number <strong>of</strong> integrated rules.<br />

5.5 Liveness Pro<strong>of</strong> <strong>of</strong> the WP Protocol<br />

In this section, we prove the liveness <strong>of</strong> WP by showing that an instruction can always be<br />

completed so that each processor can make progress. That is, whenever a processor intends to<br />

execute a memory instruction, the cache cell will be brought to an appropriate state so that the<br />

instruction can be retired. The lemmas <strong>and</strong> theorems in this section are given in the context <strong>of</strong><br />

the integrated rules <strong>of</strong> WP, which involve both imperative <strong>and</strong> directive messages. We assume<br />

FIFO message passing <strong>and</strong> proper bu er management as described in Section 5.3.<br />

104

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

Saved successfully!

Ooh no, something went wrong!