290 likes | 503 Views
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.
E N D
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. • 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.
“Multi” — More than what? • Multitasking • Multithreaded • Multiprocessing • Multicore
Multitasking • 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.
Think of Multitasking this way. Program 1 Processor Program 2
Two types of Multitasking • Cooperative • Preemptive
Cooperative Multitasking Program 1 Processor The Applications control the switching. Program 2
Preemptive Multitasking Program 1 Processor Program 2 The operating system control the switching.
Multitasking Program 1 Processor Program 2
Multithreaded • 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.
Think of Multithreading this way. Thread 1 Processor Application Thread 2
Multithreading a Video Processing Application Application Thread 1 (Video) Processor Video Video Audio Thread 2 Audio
Threads • 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.
Pentium 4 was optimized for multithreading. Logical Core 1 Thread 1 Thread 1 Thread 2 Thread 1 Logical Core 2 Thread 2 Pentium 4
Pentium D Pentium 4 Pentium 4
Multiprocessing • 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.
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.
Dual Package versus dual core. Dual Packages Dual Core CPU IC 2 Sockets 2 Heat sinks 2 Fans 2 Fan cable 2 Board Space X2 CPU IC 1 Sockets 1 Heat sinks 1 Fans 1 Fan cable 1 Board space X1
Enter the Core 2 Duo • Because 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.
The Core 2 Extreme • Fastest of the Core 2 Duo series • Allows “over-clocking”, a technique that allows users to run the CPU at a higher clock speed than the manufacture recommends.
The Core 2 Quad Second Core 2 Die First Core 2 Die
The Core 2 Quad Single Core 2 Quad Die