Ziavras bernsteins conditions conditions to be

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Graphs (2) Example: S1: Load S2: Add Add S3: Move S4: Store Store R1, A R2, R1 R2 R1 R1, R3 B, R1 R1 /R1 Memory(A) / /R2 /R2 (R1) + (R2) / (R1) (R2) /R1 (R3) / /Memory(B) /Memory(B) (R1)/ (R1)/ S1 > S2 S4 S3 S. Ziavras Bernstein’s Conditions • Conditions to be satisfied for 2 processes (in general) (i to be able to run in parallel (no data dependences, no antidependences, no output dependences) • Input set Ii of process Pi: set of all input variables Ii Pi needed to execute Pi (also known as read set or domain of Pi) • Output set Oi: all output variables generated by set Oi output variables generated by executing Pi (known as write set or range of Pi) • I1 ∩ O2= ∅ (empty set) anti-independence • I2 ∩ O1= ∅ data/flow independence • O1 ∩ O2= ∅ output independence • Generalize: a set of processes {p1, p2, … ,pk} can {p ,p execute in parallel if Bernstein’s conditions are satisfied on a pairwise basis; that is, (p1 || p2 || p3 || p4 ||... || pk) iff (pi || pj for all i≠ j) S. Ziavras Bernstein’s Conditions (2) Example: Assume that each process is a single HLL statement P1: C = D x E P1 P2: M = G + C P3: A = B + C P4 P5 P4: C = L + M P2 P5: F = G / E P3 • Only 5 pairs P1 || P5, P2 || P3, P2 || P5, P3 || P5, P4 || P5 could execute in parallel could execute in parallel • Collectively, only P2 || P3 || P5 is possible because P2 || P3, P2 || P5 & P3 || P5 S. Ziavras Bernstein’s Conditions (3) • Properties of the parallelism relation || of the parallelism relation || – Commutative: Pi || Pj – Not transitive: Pi || Pj Not transitive Pi || Pj Pj || Pk Pj || Pi Pi || Pk ? – Associative: (Pi || Pj) || Pk= Pi || (Pj || Pk) || is not an equivalence relation S. Ziavras...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online