Tom Kelliher, CS 315
Jan. 29, 1999
Sorting on a linear array, algorithm assessment.
Bit models, lower bounds.
How can we measure a parallel algorithm? Apply following to sorting on the linear array.
be the running time of the fastest sequential
algorithm. Then:

What is linear speedup?
Say you have P processors. Speedup is at most P. Why? (Hint: a parallel algorithm that runs in T steps on P processors can be simulated on a sequential machine in how many steps?)
Measures algorithm inefficiencies due to idle processors.

Example: consider two algorithms for solving a problem of size M:
steps on an
processor machine.
processor machine and need to run the algorithm X
times, which algorithm should we use? Assume the
processor machine
may be split in M M processor machines.
(Recall:
.)
Let's say we want to solve a problem of size N with P processors.
fine-grain processors in a
linear array. Can we sort N numbers?
Fine-grain vs. coarse-grain processing.

What about simulating
processors on
processors, where
?
What slowdown do we encounter?
Implications:
steps on an
-processor machine. Which algorithm is more
efficient?
Assume that the cost of running a P-processor machine for T steps is
, where
and
are constants and P = M or
. For what values of
and
is the first algorithm
cheaper to run? For what values of
and
is the second
algorithm cheaper to run?
steps
on an
-processor machine. Which algorithm will run faster on an
N-processor machine? (Hint: Your answer depends on the relative sizes of
M and N, and you will need to use the fact that an N-processor
machine can simulate a P-processor machine with slowdown
.)