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.

It can be shown that the relaxed dispatch rules have no semantic impact on program behav-<br />

iors in multiprocessor systems that employ the relaxed memory access rules. This is obvious<br />

because a processor dispatches a memory instruction only when there is no data dependence<br />

between the instruction <strong>and</strong> all the preceding instructions which have not been dispatched.<br />

The relaxed dispatch rules do not allow a memory instruction to be dispatched if a preceding<br />

instruction contains an unresolved tag. A more aggressive implementation can relax this con-<br />

straint so that a memory instruction can be dispatched even if a preceding instruction contains<br />

an unknown address or data, as long as there is no data dependence. Furthermore, we can<br />

allow speculative load instructions to be dispatched. (This requires slight modi cation <strong>of</strong> the<br />

branch completion rules since a dispatched load instruction on a wrong speculation path cannot<br />

be killed before the response from the memory is discarded). Therefore, a load instruction can<br />

be dispatched if there is no undispatched store in front itintherob that may write to the same<br />

address a store instruction can be dispatched if it is not on a speculative path <strong>and</strong> there is<br />

no undispatched load or store in front it in the rob that may read from or write to the same<br />

address.<br />

Aggressive-Dispatch-Load Rule<br />

Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Load(a,U),Wr(r)) rob2, btb, im), pmb, mpb, mem)<br />

if Store(a,-,U), Store(t 0 ,-,U) =2 rob1<br />

! Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Load(a,D),Wr(r)) rob2, btb, im), pmbht,Load(a)i, mpb,<br />

Aggressive-Dispatch-Store Rule<br />

Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Store(a,v,U)) rob2, btb, im), pmb, mpb, mem)<br />

mem)<br />

if Jz, Load(a,U), Load(t 0 ,U), Store(a,-,U), Store(t 0 ,-,U) =2 rob1<br />

! Sys(Proc(ia, rf , rob1 Itb(ia1,t :=Store(a,v,D)) rob2, btb, im), pmbht,Store(a,v)i, mpb, mem)<br />

In the architectural optimizations we have discussed so far, we do not allow value specula-<br />

tion [82, 83]. A memory instruction cannot be performed if it has an unknown address or data.<br />

Furthermore, a load instruction cannot be performed if a preceding store instruction has an<br />

unresolved address, <strong>and</strong> a store instruction cannot be performed if a preceding load or store<br />

instruction has an unresolved address. We also do not allow speculative store instructions. Such<br />

constraints can be relaxed with value speculation to achieve better performance. Conceptually,<br />

value speculation allows a processor to chose an arbitrary value for any unresolved variable at<br />

any time, provided that all the speculative instructions can be killed if the speculation turns<br />

out to be wrong. Many speculative mechanisms <strong>and</strong> compiler optimizations are special cases<br />

<strong>of</strong> value speculation. However, the impact <strong>of</strong> value speculation on program behaviors can be<br />

di cult to underst<strong>and</strong> in multiprocessor systems.<br />

Modern microprocessors contain various architecture features designed to improve performance,<br />

such as branch prediction, speculative execution, non-blocking caches, dynamic scheduling,<br />

47

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

Saved successfully!

Ooh no, something went wrong!