Jac
Single-core computer
2
Single-core CPU chip the single core
3
Multi-core architectures
• This lecture is about a new trend in computer architecture:
Replicate multiple processor cores on a single die.
Core 1
Multi-core CPU chip
Core 2
Core 3
Core 4
4
Multi-core CPU chip
• The cores fit on a single processor socket
• Also called CMP (Chip Multi-Processor)
c o r e c o r e c o r e c o r e 1
2
3
4
5
The cores run in parallel thread 1
thread 2
thread 3
thread 4
c o r e c o r e c o r e c o r e 1
2
3
4
6
Within each core, threads are time-sliced
(just like on a uniprocessor) several threads
several threads several threads several threads c o r e c o r e c o r e c o r e 1
2
3
4
7
Interaction with the
Operating 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, …
8
Why multi-core ?
• Difficult to make single-core clock frequencies even higher
• Deeply pipelined circuits:
–
–
–
–
–
heat problems speed of light problems difficult design and verification large design teams necessary server farms need expensive air-conditioning • Many new applications are multithreaded
• General trend in computer architecture (shift towards more parallelism)
9
Instruction-level parallelism
• Parallelism at the machine-instruction level
• The processor can re-order, pipeline instructions, split them into microinstructions, do aggressive branch prediction, etc.
• Instruction-level parallelism enabled rapid increases in processor speeds over the last 15 years
10
Thread-level parallelism (TLP)
• This is parallelism on a more coarser scale
• Server can serve each client in a separate
thread