Exercise guidance
Equivalence
The equivalence relationship reflects the relationship between increasing the processor and increasing the problem size in order to maintain the parallel efficiency.
Under a certain parallel implementation of the problem, write T (n, p) T(n ,p)T(n,p ) is the time required to use k processors to calculate a problem of scale n,T 0 (n, p) T_0(n, p)T0(n,p ) is the time spent on communication and redundant calculations for a problem with a scale of n using k processors. The equivalent relationship of the problem is as follows:
T (n, 1) ≥ CT 0 (n, p) T(n, 1)\ge CT_0(n,p)T(n,1)≥CT0(n,p )
whereC = E / (1 − E) C=E/(1-E)C=E/(1−E ),EEE is parallel efficiency. Since the subsequent calculations are mainly concerned with the magnitude of the function, there is no need to substituteEE in theinequalityIn the
actual calculation of E , the time complexity of the original serial algorithm (that is, the baseline originally used) isg (n) g(n)g ( n ) , the communication time complexity ish (n, p) h(n,p)h(n,p ) , can be simplified as
g (n) ≥ C h (n, p) g(n)\ge Ch(n,p)g(n)≥C h ( n ,p )
Among them, g and h can be directly replaced by the complexity metric level, and the degree of the highest complexity term can be directly incorporated into C
to simplify the inequality to obtain
n ≥ f (p) n\ge f(p)n≥f ( p )
This is the equal speedup relationship of the parallel system
Scalability function
For a problem of size n, mark M (n) M(n)M ( n ) is the memory required by the problem, then the scalability function of the parallel implementation of the problem is
M (f (p)) / p M(f(p))/pM ( f ( p ) ) / p
This function indicates how the memory capacity required by each processor increases as a function of p in order to maintain efficiency
Scalability of parallel implementation
Parallel implementation of functions with a higher level of scalability has a faster increase in memory and will reach the actual memory of the machine earlier, resulting in poor scalability; the opposite is better