23
Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures Pree Thiengburanathum Advanced computer architecture Oct 24, 2007 1

Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Embed Size (px)

DESCRIPTION

Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures. Pree Thiengburanathum Advanced computer architecture Oct 24, 2007. Agenda. Introduction Basic ideas and goals Static versus Dynamic thread assignment Architecture and Methodology Results Conclusion. Introduction. - PowerPoint PPT Presentation

Citation preview

Page 1: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Dynamic Thread Assignment onHeterogeneous Multiprocessor Architectures

Pree ThiengburanathumAdvanced computer architectureOct 24, 2007

1

Page 2: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Agenda

•Introduction•Basic ideas and goals•Static versus Dynamic thread assignment•Architecture and Methodology•Results•Conclusion

2

Page 3: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Introduction

•Multi programming •Chip multiprocessor (CMP)•Heterogeneous CMP system•Homogeneous CMP system

More processors cores in the single chip!

3

Page 4: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Goals• Heterogeneous vs. Homogeneous CMP system

• What type of core should be replicated? Many simple cores = higher thread parallelism Fewer cores, larger = lower thread parallelism

• Multi-programmed computing environment may present threads of execution with different hardware resource requirements

maximize resource utilization & achieve a high degree of inter-thread parallelism.

4

Page 5: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Basic ideas

•Taking advantage of Heterogeneous CMPMapping running tasksControl MechanismEasy to implement

Claim, a dynamic policy is more preferable than the static one.

•What is about a static policy?

5

Page 6: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Scenario of heterogeneous CMP system (1)• Two processors P1 and P2 of different type• Assume that each program will run for 1 million

instructions• IPC = (Instructions) / (cycle)

6

P1 P2

Thread A 1.6 0.4

Thread B 1.5 1

Table 1: IPC of threads A and B on cores P1 and P2

Page 7: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Scenario of heterogeneous CMP system(2)•Execution time = #instruction / IPC

•Moving the threads into different cores give the better total execution time.

7

P1 P2

Thread A ~700,000 ~2,500,000

Thread B ~700,000 ~1,000,000

Table 2: Execution time of threads A and B on cores P1 and P2

Page 8: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Scenario of heterogeneous CMP system(3)•If we move thread A into P2 and thread B to P1

Total execution time = 2.5M•If we move thread A into P1 and thread B to P2 Total execution time = 1M

• The mapping programs to the core improve performance.• Assume programs can migrate across cores

8

Page 9: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Dynamic thread assignment

•Thread assignment depends on the ratios between the IPCs on the two different core .

•The higher the ratios, the more the execution time.

•What is about thread assignment in homogenous CMP system?

9

Page 10: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Simulation approach

•Real program and real processors.•SPEC2000 and Alpha

PerformanceNumber of cores and programsIPC number problems.Thread migration overhead.New assignment policies

10

Page 11: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Processor configurations (1)

11

Page 12: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Benchmark SPEC2000

12

Page 13: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Benchmark of EV5 and EV6

13

Page 14: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Processor configurations (2)

•homogeneous configurations: 4 EV6s or 20 EV5s

•heterogeneous configurations: 5 EV5s and 3EV6s 10 EV5s and 2 EV6s 15 EV5s and 1 EV6.

14

Page 15: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

CMP Simulation Model• To evaluate different combinations of

processors, workloads, and thread assignment policies.

• The model: working principles: A multiprocessor system can be thought of as a collection of processor and thread objects where each thread represents an instance of one of the benchmark programs.

• Modeling thread migrationinter-core context switch - the architectural state (PC value, registers, etc.) Use the parameter such as switch_duration and switch_loss

15

Page 16: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Assignment Policies• Static Assignment• Well studies problem before assign• Solution rely on heuristics

• a random static assignment. Don’t know the work loads and IPC, always assign the faster core (EV6)

• a pseudo best static assignment. Know the work loads and IPC, use heuristic to find out.

• Disadvantages does not optimize EV6 usage slow” threads on EV5 penalize overall system

performance

16

Page 17: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Assignment Policies

•Round robin dynamic assignment rotating the assignment of threads to processors

in a round robin fashion ensures that the available EV6 cores are equally

shared among the running programs.

17

Page 18: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

IPC driven dynamic assignment

•Considering the characteristics of the executing threads.

•Look at IPC number and ratio to decide•Thread with higher ratio run on EV6•Thread with lower ratio run on EV5

18

Page 19: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Simulation results (1)

•Homogeneous vs. heterogeneous configuration with static assignment

19

Page 20: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Simulation results (2)

•Dynamic assignment

20

Page 21: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Conclusion

•Dynamic thread assignment increase performance and usage.

outperform a random assignment policy by 20% to 40%

outperform a homogeneous configuration by 20% to 80%

21

Page 22: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Bibliography • [1] B. Michael, C. Patrick. “Dynamic Thread Assignment on

Heterogeneous Multiprocessor Architectures”, Conference on computing frontiers, Proceedings the 3rd conference on computing systems, page 29-40, May 2006

• [2] Silberschatz, Gavin, Gagne. “Operating system concepts sixth edition”, 2004

22

Page 23: Dynamic Thread Assignment on Heterogeneous Multiprocessor Architectures

Question?

23