Modeling Critical Sections in Amdahl’s Law and its Implications for Multicore Design
Stijn Eyerman and Lieven Eeckhout
Ghent University, Belgium
ISCA, Saint-Malo, France June 23, 2010
Modeling Critical Sections in Amdahls Law and its Implications for - - PowerPoint PPT Presentation
Modeling Critical Sections in Amdahls Law and its Implications for Multicore Design Stijn Eyerman and Lieven Eeckhout Ghent University, Belgium ISCA, Saint-Malo, France June 23, 2010 Amdahls Law Speedup by parallelizing fraction f
Ghent University, Belgium
ISCA, Saint-Malo, France June 23, 2010
2
n→∞S =
3
sequential fraction: parallel fraction:
4
sequential part parallel part outside critical sections parallel part inside critical sections
ctn = probability for two critical sections to contend
5
Each thread is executed equal share
Critical sections are entered at random times Critical sections contend randomly
6
7
j= 0 n−1
8
j= 0 n−1
i= 0 n−1
j= 0 i
cs i 1− P cs
n−1−i i= 0 n−1
ctn j 1− P ctn
i− j ⋅ j= 0 i
cs =
9
cs i 1− P cs
n−1−i i= 0 n−1
ctn j 1− P ctn
i− j ⋅ j= 0 i
csP ctn + 1− P csP ctn
sequential part parallel part
10
csP ctn + f par,cs ⋅ 1− P csP ctn
11
12
ctn
ctn
ctn + f par,cs 1− P ctn
ctn + f par,cs 1− P ctn
13
0.2 0.4 0.6 0.8 1 1.2 2 4 6 8 10
normalized exec time number of threads formula 1 formula 2 synthetic simulation case #1 case #2 synthetic simulation
f par,cs = 0.5, f par,ncs = 0.5,P
ctn = 0.5
Avg error of 3% compared to synthetic simulation
14
n→∞S =
ctn
0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 2000 4000 6000 8000 10000 0.01 0.03 0.05 0.07 0.09
ctn
15
16
[M. Hill and M. Marty, IEEE Computer, 2008]
linear speedup w/ increasing
sublinear speedup in single- thread performance (Pollack’s law)
17
n→∞S =
ctn
sequential part is executed on big core sequential part due to critical sections is executed on small cores
18
256 BCEs (base core equivalents) – Hill & Marty
19
20
by Suleman et al. [ASPLOS’09]
21
22
Ghent University, Belgium