presentation 31 – multicore, multiprocessing, multithreading, and multitasking

25
Copyright © 2007 Heathkit Company, Inc. All Rights Reserved PC Fundamentals Presentation 31 Presentation 31 Multicore, Multicore, Multiprocessing, Multithreading, Multiprocessing, Multithreading, and Multitasking. and Multitasking.

Upload: margaret-walton

Post on 01-Jan-2016

39 views

Category:

Documents


2 download

DESCRIPTION

Presentation 31 – Multicore, Multiprocessing, Multithreading, and Multitasking. Objectives. At the end of this presentation, you will be able to:. Explain the difference between multitasking and multiprocessing. Explain the difference between multithreading and multiprocessing. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

Copyright © 2007 Heathkit Company, Inc. All Rights Reserved

PC Fundamentals

Presentation 31 Presentation 31 –– Multicore, Multicore, Multiprocessing, Multithreading, and Multiprocessing, Multithreading, and

Multitasking.Multitasking.

Page 2: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

2

ObjectivesObjectives

At the end of this presentation, you will be able to:

Page 3: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

3

Explain the difference between multitasking and multiprocessing.

Explain the difference between multithreading and multiprocessing.

List several disadvantages of achieving multiprocessing by using multiple MPU packages.

Explain the difference between cooperative and preemptive multitasking.

Explain the difference between symmetrical and asymmetrical multiprocessing.

Discuss the internal structure of the Pentium D, Core 2 Duo, and Core 2 Quad microprocessors.

Page 4: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

4

““Multi” Multi” — More than what?— More than what?

MultitaskingMultithreadedMultiprocessingMulticore

Page 5: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

5

MultitaskingMultitasking

The apparent simultaneous execution of two or more programs by a single processor.

What appears to be simultaneous execution is actually concurrent execution.

Dates back to the earlier days of Windows.

Page 6: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

6

Think of Multitasking this way.Think of Multitasking this way.

Program 1

Program 2

Processor

Page 7: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

7

Two types of MultitaskingTwo types of Multitasking

CooperativePreemptive

Page 8: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

8

Cooperative MultitaskingCooperative Multitasking

Program 1

Program 2

ProcessorThe Applications control the switching.

Page 9: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

9

Preemptive MultitaskingPreemptive Multitasking

Program 1

Program 2

Processor

The operating system control the switching.

Page 10: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

10

MultitaskingMultitasking

Program 1

Program 2

Processor

Page 11: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

11

A single Program or Application can be written so that it can be executed as two or more “threads” of instructions.

A “thread” can be thought of as a stand alone task.

For example, in a video processing application the video information could be processed as one thread; the audio as another.

MultithreadedMultithreaded

Page 12: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

12

Think of Multithreading this way.Think of Multithreading this way.

Thread 1

Thread 2

ProcessorApplication

Page 13: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

13

Multithreading a Video Processing Multithreading a Video Processing ApplicationApplication

Thread 1(Video)

Thread 2Audio

Processor

Application

VideoVideo Audio

Page 14: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

14

ThreadsThreads

Threads occur within a single application.The application must be written for

Multithreading.Not all applications lend themselves to this

form of parallelization.The processor must support multithreading.Not all processors do.

Page 15: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

15

Pentium 4 was optimized for Pentium 4 was optimized for multithreading.multithreading.

LogicalCore 1

Pentium 4

LogicalCore 2

Thread 1

Thread 2

Thread 1 Thread 2 Thread 1

Page 16: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

16

Pentium DPentium D

Pentium 4

Pentium 4

Page 17: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

17

MultiprocessingMultiprocessing

A single computer runs two (or more) separate programs at the same time.

Servers and workstations achieved this by using multiple processors in separate packages.

PCs achieve this by using multiple cores in a single package.

Page 18: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

18

Types of Multiprocessing (MP)Types of Multiprocessing (MP)

Symmetrical MP—The operating system assigns tasks as it sees fit.

Asymmetrical MP—The program designer chooses the processor at the time the program is written.

Page 19: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

19

Dual Package versus dual core. Dual Package versus dual core.

CPU IC 2

Sockets 2

Heat sinks 2

Fans 2

Fan cable 2

Board Space X2

Dual Packages

CPU IC 1

Sockets 1

Heat sinks 1

Fans 1

Fan cable 1

Board space X1

Dual Core

Page 20: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

20

Enter the Core 2 DuoEnter the Core 2 DuoBecause the Pentium D was made up of two

Pentium 4 cores, it was not optimized for dual processing.

Intel redesigned the architecture of the CPU, optimizing it for multiprocessing.

The result is called “Core” architecture. Apparently, this is a new trade name that replaces “Pentium”.

One of the early processors to use this new architecture is the Core 2 Duo.

Page 21: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

21

Core 2 DesignCore 2 Design

Page 22: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

22

The Core 2 ExtremeThe Core 2 Extreme

Fastest of the Core 2 Duo seriesAllows “over-clocking”, a technique that

allows users to run the CPU at a higher clock speed than the manufacture recommends.

Page 23: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

23

The Core 2 QuadThe Core 2 Quad

First Core 2 Die Second Core 2 Die

Page 24: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

24

The Core 2 QuadThe Core 2 Quad

Single Core 2 Quad Die

Page 25: Presentation 31  –  Multicore, Multiprocessing, Multithreading, and Multitasking

Copyright © 2007 Heathkit Company, Inc. All Rights Reserved

PC Fundamentals

EndEnd