6.3.1 Explain MS Windows process management:
a. Multithreading
- Multithreading is the ability of a centra processing unit or a single core in a multi-core processor to execute multiple processor or threads concurrently, appropriately supported by the Operating System. This approach differs from multiprocessing, as with multithreading the processes and threads have to share the resources of a single or multiple cores: the computing units, the CPU caches, and the translation look a side buffer(TLB).
- Where multiprocessing systems include multiple complete processing units, multithreading aims to increase utilization of a single core by using thread-level as well as instruction-level parallelism. As the two techniques are complementary, they are sometimes combined in systems with multiple multithreading CPUs and in CPUs with multiple multithreading cores.
Advantage:
- If a thread gets a lot of cache misses, the other threads can continue taking advantage of the unused computing resources, which may lead to faster overall execution as these resources would have been idle if only a single thread was executed. Also, if a thread cannot use all the computing resources of the CPU (because instructions depend on each other's result), running another thread may prevent those resources from becoming idle.
- If several threads work on the same set of data, they can actually share their cache, leading to better cache usage or synchronization on its values.
Disadvantages:
-
Multiple threads
can interfere with each other when sharing hardware resources such as caches or
translation lookaside buffer (TLBs). As a
result, execution times of a single thread are not improved but can be
degraded, even when only one thread is executing, due to lower frequencies or
additional pipeline stages that are necessary to accommodate thread-switching
hardware.
- From the software standpoint, hardware support for multithreading is more visible to software, requiring more changes to both application programs and operating systems than multiprocessing. Hardware techniques used to support multithreading often parallel the software techniques used for computer multitasking of computer programs. Thread scheduling is also a major problem in multithreading.
 |
Process of Multithreading |
b. Multiprocessing
- Multiprocessing is the use of two or
more central processing unit (CPUs) within a single computer system.
The term also refers to the ability of a system to support more than one
processor and/or the ability to allocate tasks between them. There are
many variations on this basic theme, and the definition of multiprocessing
can vary with context, mostly as a function of how CPUs are defined
- According to some on-line dictionaries, a multiprocessor is
a computer system having two or more processing units (multiple
processors) each sharing main memory and peripherals, in order to
simultaneously process programs. A 2009 textbook defined multiprocessor
system similarly, but noting that the processors may share "some or
all of the system’s memory and I/O facilities"; it also gave tightly
coupled system as a synonymous term.
At the operating
system level, multiprocessing is sometimes used to refer to
the execution of multiple concurrent processes in a system, with each process
running on a separate CPU or core, as opposed to a single process at any one
instant. When used with this definition, multiprocessing is sometimes contrasted with multitasking,
which may use just a single processor but switch it in time slices between tasks
 |
Symmetric Multiprocessing
|
c. Multitasking
Comments
Post a Comment