Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling...
-
Upload
grant-ford -
Category
Documents
-
view
218 -
download
0
Transcript of Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling...
![Page 1: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/1.jpg)
Multi-core processors
![Page 2: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/2.jpg)
2
Processor development till 2004
Out-of-orderInstruction scheduling
![Page 3: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/3.jpg)
3
Why multi-core ?• Difficult to increase clock frequencies even higher –
heat problems. • Moore’s law is at its limits• Deeply pipelined circuits:– heat problems, needs special cooling arrangements
• Many new applications are multithreaded • Multi-core is an attractive alternative. General trend
in computer architecture (shift towards more parallelism)
![Page 4: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/4.jpg)
4
Single-core computer
![Page 5: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/5.jpg)
5
Single-core CPU chipthe single core
![Page 6: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/6.jpg)
6
Multi-core architectures
Replicate multiple processor cores on a single die.
Core 1 Core 2 Core 3 Core 4
Multi-core CPU chip
![Page 7: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/7.jpg)
Multi-core processor
![Page 8: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/8.jpg)
8
Multi-core CPU chip
• The cores fit on a single processor socket• Also called CMP (Chip Multi-Processor)
core
1
core
2
core
3
core
4
![Page 9: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/9.jpg)
9
The cores run in parallel
core
1
core
2
core
3
core
4
thread 1 thread 2 thread 3 thread 4
![Page 10: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/10.jpg)
10
Within each core, threads are time-sliced (just like on a uniprocessor)
core
1
core
2
core
3
core
4
several threads
several threads
several threads
several threads
![Page 11: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/11.jpg)
11
Interaction with theOperating System
• OS perceives each core as a separate processor
• OS scheduler maps threads/processes to different cores
• Most major OS support multi-core today:Windows, Linux, Mac OS X, …
![Page 12: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/12.jpg)
12
Instruction-level parallelism
• Parallelism at the machine-instruction level• Instruction-level parallelism enabled rapid
increases in processor speeds over the last 15 years
• The processor can re-order, pipeline instructions, split them into microinstructions, do aggressive branch prediction, etc.
![Page 13: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/13.jpg)
13
Thread-level parallelism (TLP)• This is parallelism on a more coarser scale• Server can serve each client in a separate thread (Web
server, database server)• A computer game can do AI, graphics, and a physics-
related computation in three separate threads• Single-core superscalar processors cannot fully exploit TLP• Multi-core architectures are a natural evolution: explicitly
exploiting TLP
![Page 14: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/14.jpg)
14
General context: Multiprocessors
• Multiprocessor is any computer with several processors
• SIMD– Single instruction, multiple data– Modern graphics cards
• MIMD– Multiple instructions, multiple data
![Page 15: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/15.jpg)
15
Multiprocessor memory types
• Shared memory:In this model, there is one (large) common shared memory for all processors
• Distributed memory:In this model, each processor has its own (small) local memory, and its content is not replicated anywhere else
![Page 16: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/16.jpg)
16
Multi-core processor is a special kind of a multiprocessor:All processors are on the same chip
• Multi-core processors are MIMD:Different cores execute different threads (Multiple Instructions), operating on different parts of memory (Multiple Data).
• Multi-core is a shared memory multiprocessor:All cores share the same memory
![Page 17: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/17.jpg)
17
What programs can use multicore
• Editing a photo while recording a TV show through a digital video recorder
• Downloading software while running an anti-virus program
• “Anything that can be threaded today will map efficiently to multi-core”
• BUT: some applications difficult to parallelize
![Page 18: Multi-core processors. 2 Processor development till 2004 Out-of-order Instruction scheduling Out-of-order Instruction scheduling.](https://reader035.fdocuments.us/reader035/viewer/2022062409/5697bf921a28abf838c8ec2a/html5/thumbnails/18.jpg)
18
Intel Core Architecture
• These are multi-core processors• Intel i3 mostly dual core• Intel i5 and i7 (Nehalem) are quad core processors• Intel i7 has L1 cache 32KB instructions + 32 KB data per
core + L2 256 KB per core + L3 cache 4-8 MB shared among all cores