Sei sulla pagina 1di 3

Multithreading vs Multiprocessor

The problem faced by Intel is that the clock speed cannot be increased to a much higher
rate, so multiple cores are the current solution to providing faster microprocessors. The
first step towards solution to this problem was multithreading which was introduced by
Intel in its Pentium 4 microprocessors, it was also called Hyper-threading [2]. To
understand the difference between multithreading and microprocessor architectures,
one must understand the concept of program, process and thread.

Introduction to Thread and Process


Each process provides the resources needed to execute a program. A process has its own
address space, set of system resources and at least one thread of execution. Each process
is started with a single thread, often called the primary thread, but can create additional
threads from any of its threads.

A thread is the entity within a process that can be scheduled for execution. All threads of
a process share its address space and system resources. The system scheduler controls
which of the threads receive the next processor time slice. [1]

Multithreading Vs Multiprocessor
Functionality of multithreading is explained as thread level parallelism (i.e. executing
multiple threads in parallel) and it is also termed as Simultaneous Multithreading
(SMT). It is done by weaving together multiple threads on the same core allowing
multiple independent threads to execute SIMULTANEOUSLY on the SAME core. It is
possible because different threads use different functional parts of the processor at any
instance. For example, if one thread is waiting for a floating point operation to complete,
another thread can use the integer units, both threads can run concurrently (see figure
1). Thus Operating System and program perceive the single processor as multiple
processors (virtual processors) [3].
Multithreading has following limitations:
i. Multithreading can only be achieved if the code of the running program has been
optimized for it [2].
ii. It will be unable to process multiple threads simultaneously if they require the
same functional part of the processor, see figure 2.

Multiprocessor or Multicore is an architecture where a single chip contains multiple


processors (each with its own set of registers and processing resources). It is also called
Chip Multiprocessor (CMP) or multicore processor [3]. This resolves the above
mentioned limitations of multithreading i.e. now the code need not be optimized for
simultaneous processing and two threads requiring same functional part of processor
can be execuded simultaneously, see figure 3 [2], [3].

Figure 1

Figure 2
Figure 3

References
1. https://msdn.microsoft.com/en-
us/library/windows/desktop/ms681917%28v=vs.85%29.aspx
2. The Intel Microprocessors by Berry b Brey 8th Edition
3. http://people.ee.duke.edu/~sorin/prior-courses/ece152-
spring2009/lectures/8.2-multicore.pdf

Potrebbero piacerti anche