Ley de Amdahl#

import numpy as np
import matplotlib.pyplot as plt
N=np.linspace(1,100,100)
F1=0.1
F2=0.3
F3=0.5
F4=0.9
S1=N/(N*F1+1-F1)
S2=N/(N*F2+1-F2)
S3=N/(N*F3+1-F3)
S4=N/(N*F4+1-F4)
plt.plot(N,S1,N,S2,N,S3,N,S4)
plt.title("Ley Amdlah")
plt.xlabel("#Procesadores")
plt.ylabel("Speed-Up o Aceleración")
plt.grid(True)
../../_images/8f9e1f2eeefce0f2ed1ccffc0ddf824e9eb3c554af298c1a1dec1751dc4c8d0a.png
E1=1/(N*F1+1-F1)
E2=1/(N*F2+1-F2)
E3=1/(N*F3+1-F3)
E4=1/(N*F4+1-F4)
plt.plot(N,E1,N,E2,N,E3,N,E4)
plt.title("Ley Amdlah")
plt.xlabel("#Procesadores")
plt.ylabel("Eficiencia")
plt.grid(True)
../../_images/667ee54f54f9ea336ac86fff7a0d5cee5d0a7c8479c30953414b54418342cd5b.png
F=np.linspace(0,1,100)
N1=12
N2=100
N3=1000
S1=N1/(N1*F+1-F)
S2=N2/(N2*F+1-F)
S3=N3/(N3*F+1-F)
plt.plot(F,S1,F,S2,F,S3)
plt.title("Ley Amdlah")
plt.xlabel("Fraccion no paralelizable - F")
plt.ylabel("Speed-Up o Aceleración")
plt.grid(True)
../../_images/518d40c5a64c530f4f7508ef03142b7da9dd312995c2d90e597c42e3ed474e85.png