Skip to content

6. DO-ALL

Feb 1, 2021

DO-ALL Problem

Recall PRAM comes with (1) synchrony (2) high bandwidth memory and (3) no failures → now remove synchrony.

In a DO-ALL problem, we have: - N tasks and tasks are indivisible - P processors and N=P - all processors do the same task

1
2
for pid = 1...P do
    DO TASK(PID)

Analysis

Uniprocessor time

T1,LB=Ω(N)     T1,UB=O(N)     T1=Θ(N)

Parallel time

TP=Θ(1)

S=T1(N)TP(N)=Θ(N)Θ(1)=Θ(N)=Θ(P)

W=PTP(N)=Θ(P1)=Θ(N)=O(T1(N))

When WP=WT1 work is optimal

Handling asynchrony

One of the biggest problems in parallel computing is distinguishing failed processors from slow processors. If crash occurs then it is detectable.

Fail-Stop processors never perform erroneous state transformation due to failure. Instead, the processor halts and its state is irretrievably lost.

How does asynchrony happen? Can occur from e.g. page faults.

1
2
3
for pid= 1...P pardo
    for i= 1...N
        do task(i)

As long as at least 1 processor does not crash, N tasks will complete; all processors will do N tasks.

With this strategy: - W=PΘ(N)=Θ(N2)no speedup! - Work lower bound is Ω(N)

What we want is to find solutions in this space between N and N2:

img



Lower bound for async PRAM DO-ALL is Ω(NlgN). Optimality is not achievable in asynchronous world: the lower bound is NlgN. No algorithm meets this lower bound.



Algorithms with TP=O(lgN) implies W=PO(lgN)=O(PlgN). Algorithm is log efficient when the best sequential W degrades by a log factor.

Oracle vs. Adversary

Goal: finish all tasks.

Challenge: dealing with an adversary who kills processors and tries to slow down progress.

All tasks are: - similar size - idempotent - tasks can be performed repeatedly without harm - independent - order of completion does not matter

Oracle will do perfect load balancing and divide tasks equally between processors.

Adversary kills 1/2 of processors on each round.

img


Adversary loses when N2k1=1:   N=2k1     lgN=k1     k=Θ(lgN)

Work per round: N2+N2+N2+...W=N2Θ(lgN)=Θ(NlgN)