多核处理器体系结构及并行程序设计
时间:2025-02-27
时间:2025-02-27
多核处理器体系结构及并行程序设计
多核处理器体系结构及并行程序设计
天津大学 于策 yuce_air@http://
多核处理器体系结构及并行程序设计
Outline 多核处理器简介 并行程序设计方法学(PCAM) 并行程序设计方法学(PCAM) 科研及技术(天津大学SRDC及IBM技术中心) 技术中心) 科研及技术(天津大学SRDC及IBM技术中心
http://
2
http://
多核处理器体系结构及并行程序设计
Outline 多核处理器简介 并行程序设计方法学(PCAM) 并行程序设计方法学(PCAM) 科研及技术(天津大学SRDC及IBM技术中心) 科研及技术(天津大学SRDC及IBM技术中心)
http://
3
http://
多核处理器体系结构及并行程序设计
什么是多核处理器? 两个或多个独立运行的内 核集成于同一个处理器上 面– 双核处理器 =一个处理器上包含 2个内核 – 多核处理器 = 一个处理器上包 含2个或多个内核
Core0
Core1
Front Side Bus
http://
4
http://
多核处理器体系结构及并行程序设计
为什么要采用多核技术?
http://
5
http://
多核处理器体系结构及并行程序设计
最终目标: 最终目标: 提升用户的体验 摩尔定律 —— 不断发展和改进处理器的性能 最大限度地利用越来越多的晶体管– – – 实现最优的价值 缩减处理时间,提高计算能力 缩减处理时间, 开发平台的新特性和新功能
http://
6
http://
多核处理器体系结构及并行程序设计
通过并行方式改进处理器的性能1995 MultiMulti-processing 2001 HyperHyper-Threading 2005+ DualDual- and Multi-core Multi-
2-way SMP system 2 Cores 2 Threads
2-way SMP system 2 Cores 4 Threads
2-way SMP system 4 Cores >4 Threads
http://
7
http://
多核处理器体系结构及并行程序设计
多核技术的发展Pentium 4 with HT Dual Xeon Processors Dual CoreTwo independent execution cores in the same processor
State State Execution Cache Bus2 Threads 1 Packagehttp://
State Execution Cache Bus
State Execution Cache Bus2 Threads 2 Packages8
State Execution Cache Bus2 Threads 1 Package
State Execution Cache Bus
http://
多核处理器体系结构及并行程序设计
几种不同的技术 HT – Hyper Threading: 2 threads running on the same processor core– 处理器上的某些资源会被共享 – 使用相同的缓存和运算器
DC – Dual Core: 2 execution cores in the same processor package– 共享系统总线 – 与双处理器的性能相同
DP/MP – Dual/Multi-Processing: 2 or more processors in Dual/Multithe same system– 只共享系统总线,独立缓存 只共享系统总线, – 高性能,资源冲突少 高性能,
http://
9
http://
多核处理器体系结构及并行程序设计
双核技术 VS. 超线程技术 双核是真正意义上的双处理器– 不会发生资源冲突 – 每个线程拥有自己的缓存、寄存器和运算器 每个线程拥有自己的缓存、
一个3.2GHz Smithfiled在性能上并非等同于3.2GHz 一个3.2GHz Smithfiled在性能上并非等同于3.2GHz P4 with HT 的2 倍– HT 使处理
器的性能至少提升了1/3 使处理器的性能至少提升了1/3 – 双核的性能相当于2块 non-HT 处理器 双核的性能相当于2 non-
双核技术与HT技术在性能上的对比 双核技术与HT技术在性能上的对比 Ex 1: 两个floating point线程 (Smithfield client) 两个floating point线程– 每个线程拥有自己的FPU, 没有资源冲突 每个线程拥有自己的FPU, – 尽管性能上没有提升太多,但仍然优于HT 尽管性能上没有提升太多,但仍然优于HT
Ex 2: 一个integer线程与一个floating point线程 一个integer线程与一个floating point线程– 性能大幅度提升 – 没有资源冲突
http://
10
http://
多核处理器体系结构及并行程序设计
Single core , With HT( Eg. Pentium 4 Processor With HT )Integer and Floating Point ThreadsL2L2 Cache andControl Cache and ControlBTB
Integer
3
3
uCode ROM
2 threads can be executed at the same time (per processor) if they’re not competing for the same execution resourcehttp://
Floating Point
11
http://
L1 D-Cache and D-TLB Cache D
Rename/Alloc
Trace Cache
BTB & I-TLB
uop Queues
Schedulers
Decoder
多核处理器体系结构及并行程序设计
Single core , With HT( Eg. Pentium 4 Processor with HT )Two Floating Point ThreadsL2L2 Cache andControl Cache and ControlBTB
Integer
3
3
uCode ROM
2 threads CANNOT be executed at the same time (per processor) if they’re competing for the same execution resource (eg. 2 floating point threads in a P4P architecture)http://
Floating Point
12
http://
L1 D-Cache and D-TLB Cache D
Rename/Alloc
Trace Cache
BTB & I-TLB
uop Queues
Schedulers
Decoder
多核处理器体系结构及并行程序设计
Dual core , Without HT( Eg. Pentium D Processor )Two Floating Point ThreadsL2 L2 Cache andControl Cache and ControlBTB
3
3
uCode ROM
L2 L2 Cache andControl Cache and ControlBTB
Integer
Floating Point
3
3
uCode ROM
http://
Floating Point
L1 D-Cache and D-TLB
Rename/Alloc
Trace Cache
BTB & I-TLB
uop Queues
Schedulers
Decoder
L1 D-Cache and D-TLB
Rename/Alloc
Trace Cache
…… 此处隐藏:2491字,全部文档内容请下载后查看。喜欢就下载吧 ……
下一篇:第十八章 电力系统静态稳定性