Presentation is loading. Please wait.

Presentation is loading. Please wait.

Professor Ioana Banicescu CSE 8843

Similar presentations


Presentation on theme: "Professor Ioana Banicescu CSE 8843"— Presentation transcript:

1 Professor Ioana Banicescu CSE 8843
Models 4 Professor Ioana Banicescu CSE 8843

2 Performance of parallel algorithms:
Given: parallel algorithm (we measure it’s performance in terms of worst-case analysis) Let Q be a problem: We have a PRAM algorithm that runs in: T(n) using P(n) processors (for an instance of size n) C(n)=T(n).P(n) //Cost of parallel algorithm The parallel algorithm can be converted into a sequential algorithm that runs in O(C(n)) time. We have a single processor to simulate the P(n) processors in O(P(n)) time, for each for the T(n) parallel steps If p<=P(n): For each of the T(n) parallel steps, we have p processors simulate the original P(n) original processors in O(P(n)/p) substeps. (In the first step, PEs: 1,2,…,p are simulated. In the second step, PEs: p+1,p+2,….,2p are simulated, etc.) This simulation takes O(T(n).P(n)/p) time. When p>P(n), the running time of T(n) can be achieved using P(n) processors only.

3 Equivalent ways of measuring the performance of parallel algorithms:
P(n) processors and T(n) time C(n)=P(n).T(n) cost and T(n) time O(T(n)P(n)/p) time for any number p<=P(n) PEs O(C(n)/p + T(n)) time for any number p of PEs Example 1: PRAM algorithm to compute sum of n elements: n PEs and O(log n) time O(n.log n) cost and O(log n) time O(n.log n/p) time for any p<=n O(n.log n/p + log n) time for any p

4 Equivalent ways of measuring the performance of parallel algorithms: (continued…)
Example 2: PRAM algorithm to perform matrix multiplication: n3 PEs and O(log n) time O(n3.log n) cost and O(log n) time O(n3.log n/p) time for any p<=n3 O(n3.log n/p + log n) time for any p


Download ppt "Professor Ioana Banicescu CSE 8843"

Similar presentations


Ads by Google