Unit - 4 Computing Technologies: To - Bca 4 Sem BY-Vijayalaxmi Chiniwar

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 34

UNIT -4

Computing Technologies
To - BCA 4th Sem
BY- Vijayalaxmi Chiniwar
Introduction to Parallelism
Types of Parallelism
Hardware parallelism
Software parallelism
Types of Parallelism
Parallelism in Hardware (Uniprocessor)
* Bit-Level Parallelism - BLP
1▪ Parallelism in a Uni-processor
– Pipelining
– Superscalar, VLIW etc.
2▪ SIMD instructions, Vector processors, GPUs
3▪ Multiprocessor (MIMD)
– Symmetric shared-memory multiprocessors
– Distributed-memory multiprocessors
– Chip-multiprocessors a.k.a. Multi-cores
4▪ Multicomputer a.k.a. clusters
▪ Parallelism in Software
1▪ Instruction level parallelism -ILP
2▪ Task-level parallelism /thread level parallelism - TLP
3▪ Data parallelism - DLP
4▪ Transaction level parallelism
Parallel Computing
• Parallel computing is a type of computation in
which many calculations or the execution of
processes are carried out simultaneously.
• Different forms of Parallel computing are –
BLP, ILP, TLP, DLP, Transaction-LP .
• Thread level parallelism is also known as –
Task level parallelism, Function level parallelism,
control level parallelism.
Parallel computing Vs Concurrent
computing
• At any given point of time – if there is more
than one through-put is known as Parallel
computing.
• At any given point of time – if there is one
through-put but control switch over more any
one task giving a feel of multitasking- is known
as Concurrent computing.
Continue
• Parallel computing – here a computational task is
typically broken down into several, often many,
very similar subtasks that can be processed
independently and whose results are combined
afterwards, upon completion.
• Concurrent computing - here the various
processes often do not address related tasks;
when they do, as is typical in distributed
computing, the separate tasks may have a varied
nature and often require some inter-process
communication during execution.
Example
• Bit-level parallelism – is example for true
parallelism without concurrency.
• For concurrency - Multitasking by timesharing
on single core CPU.
Bit- level parallelism
• Bit-level parallelism is a form of parallel
computing based on increasing processor
word size.

• Increasing the word size reduces the number


of instructions the processor must execute in
order to perform an operation on variables
whose sizes are greater than the length of the
word.
Instruction level parallelism
• Instruction-level parallelism (ILP) is a measure
of how many of the instructionsin a computer
program can be executed simultaneously.
• There are two approaches to instruction level
parallelism:
a) Hardware
b) Software
Types of ILP
a) Dynamic Parallelism: Dynamic parallelism
means the processor decides at run time which
instructions to execute in parallel.
b) Static Parallelism: whereas static parallelism
means the compiler decides which instructions
to execute in parallel
Data parallelism
• The same task run on different data in parallel
is known as data parallelism.
Thread level Parallelism
• Different tasks running on the same data is
known as Thread level parallelism
Transaction –level parallelism

Deliberately Left Blank


Pipelining
• What is Pipelining?
• Types of Pipeling –> a) Temporal pipeline b)
Spatial Pipeline.
• Advantages -> Good Through-put
• Features of Pipeling
• Limitations: (Hazards) -> a) Data Hazard b)
Control hazard c) Structural Hazard
• Difference between Pipeling and Super-pipelining
Super-pipelining
Super-Scalar Pipeling
Super-pipelining Vs Super-scalar
Super-pipelining Super-scalar pipelining
Multitasking vs Multithreading
Multitasking Multithreading
• In multitasking, the system • In multithreading, the system
allows executing multiple executes multiple threads of the
programs and tasks at the same or different processes at
same time.
the same time.
• In multitasking CPU has to
switch between multiple • In multithreading CPU has to
programs so that it appears switch between multiple threads
that multiple programs are to make it appear that all threads
running simultaneously. are running simultaneously.
• Multitasking allocates • In multithreading threads
separate memory and belonging to the same process
resources for each shares the same memory and
process/program
resources as that of the process.
Multiprogramming, Multitasking,
Multithreading Vs Multiprocessing
• Multiprogramming -
a) More than one task/program/job/process can reside into the
main memory at one point of time. This ability of the OS is called
multiprogramming.

• Multitasking –
a) More than one task/program/job/process can reside into the
same CPU at one point of time. This ability of the OS is called
multitasking.
b) Tasks sharing a common resource (like 1 CPU).
c) That is use of just a single processor but switch in time slices
between tasks (i.e. a time-sharing system).

• Multithreading is an extension of multitasking.


Multiprocessing
Multiprocessing –
• Use of more than one CPU at a time.
• Use of two or more CPU within a computer
system. ( Also known as SMP or tightly coupled
System).
• 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.
Continue…
• Multiprocessing however means true parallel
execution of multiple processes using more
than one processor.
• Other authors prefer to refer to the operating
system techniques as multiprogramming and
reserve the term multiprocessing for the
hardware aspect of having more than one
processor.
Multiprocessor/Multi-core Vs
Multicomputer
Sometimes, terms such as multi-processor,
multi-core are used to differentiate how
processing units are organized in chips, and
what other physical resources are shared
among them, like L2, buses, etc

Q?
Deliberately left blank
Multithreading and its types
• In computer architecture, multithreading is
the ability of a central processing unit (CPU) or
a single core in a multi-core processor to
execute multiple threads concurrently ,
appropriately supported by the operating
system.
• Inter-leaved or temporal and Simultaneous
Multithreading are two forms of
Multithreading.
Continue…
• The ability to execute maximum number of
concurrent threads in any given pipeline
stage in a given cycle – we have types.
1) In temporal multithreading, instructions
from only one thread can be execute in any
given pipeline stage at a time.
2) In simultaneous multithreading, instructions
from more than one thread can be executed
in any given pipeline stage at a time.
SMT [Pure Hardware Technology]
• Also known as Super-threading , Hyper-
threading.
• Simultaneous multithreading (SMT) is a
technique for improving the overall efficiency
of superscalar CPUs with hardware
multithreading.
• In multi-core computer’s the ability to execute
more than one thread in each core – is known
as SMT or Hyper-threading.
Single-threaded process VS
Multithreaded Process
Non Hyper-threading
Hyper-Threading
Multithreaded Categories Overview
Simultaneous
Superscalar Fine-Grained Coarse-Grained Multiprocessing Multithreading
Time (processor cycle)

Time (processor cycle)


Thread 1 Thread 3 Thread 5
Thread 2 Thread 4 Idle slot
References
1) Hardware and Software parallelism by
prashantdahake – Slide Share.
2) Parallel Computing , Computer Multitasking,
Multiprocessing – wikipedia
3) Difference -

You might also like