0% found this document useful (0 votes)
11 views38 pages

Micro

Uploaded by

shardyc6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views38 pages

Micro

Uploaded by

shardyc6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Parallelism in Uniprocessor

Uniprocessor is a computer system type that has only one central processing unit which
means that only one instruction will be executed at a time All tasks and operations are
handled by a single processor. This type of processor is found only on personal computers
mobile devices and small embedded systems. These systems have limited computing power
as they can execute only one instruction at a time. These types of processors are suitable for
various common computing tasks such as web browsing, word processing, and basic gaming.
But multiprocessor systems it has multiple processors that execute instructions
simultaneously by providing greater computing power and faster processing speeds.

What is Parallelism?
Parallelism is the process performed by the computer system to perform multiple instructions
simultaneously by dividing each task into different processors. This ability is achieved in
Uniprocessor by using many ways such as using multi-processor or cores within a single
processor, diving a task into smaller subtasks that can be executed concurrently, or using
specialized hardware or software to manage parallel processing

Parallelism in Uniprocessor
Uniprocessor has only one processor but still, it is possible to achieve parallelism by using
certain techniques such as pipelining and multitasking.

Pipelining is a technique that allows a processor to execute a set of instructions


simultaneously by dividing the instructions execution process into several stages. Each stage
works on a different instruction at the same time, so that when one instruction is being
fetched in the memory another instruction is being executed. This increases the throughput of
a processor and improves performance.

Multitasking is a technique where it enables a uniprocessor to execute multiple tasks


simultaneously. This is achieved by dividing the processor’s time into short time slots and
switching tasks rapidly. Each task is given a specific time slot in which the needs to be
executed. This gives an appearance of parallel execution even if the processor is only
executing one task at a time.

These techniques improve the performance of a uniprocessor but as the number of tasks or
instructions are executed simultaneously increases the performance eventually gets declined
hence here we need a multiprocessor to improve performance.
Advantages of Uniprocessor
Improves performance- Improves the performance of a uniprocessor by allowing it to execute
multiple tasks or instructions simultaneously. This is achieved by increasing throughput
which reduces the time required to complete a particular task.
Cost Effective- A Parallelism in uniprocessor is cost-effective for applications that do not
require the performance of a multiprocessing system. The cost of a uniprocessor with
parallelism is often lower compared to a multiprocessing system.
Low power consumption- A uniprocessor consumes less power than a multiprocessor system
which makes it suitable for mobile and battery powers devices.
All these advantages make the uniprocessor an attractive option for some applications.

Disadvantage of Uniprocessor
Limited scalability– Parallelism is achieved in a very limited way and as the number of tasks
or instructions being executed simultaneously increases the performance decrease. This
makes it unsuitable for applications that require high levels of parallelism.
Limited processing power– It has limited processing power as compared to a multiprocessing
system hence it is not suitable for applications that require high computational power like
scientific simulations and large-scale data processing.
Complex design– Implementing parallelism in a uniprocessor can be complex as it requires
careful design and optimization to ensure that the system operates correctly and efficiently
this increases the development and maintenance costs of the system.
Applications of Parallelism in Uniprocessor
Multimedia applications– In multimedia applications such as video and audio playback,
image processing, and 3D graphics rendering it helps in increasing performance.
Web servers– Provides assistance to web servers by allowing them to handle multiple
requests simultaneously which makes it more reliable.
Artificial Intelligence and machine learning– It improves performance in artificial
intelligence and machine learning applications allowing them to process large amounts of
data more quickly.
Scientific simulations– Parallelism performs scientific simulations such as weather
forecasting, fluid dynamics, and molecular modeling.
Database management systems– Parallelism in uniprocessors is used to improve the
performance of database management systems by allowing them to handle large volumes of
data more efficiently.
Basically, parallelism is applied to a wide range of applications in a uniprocessor to improve
their performance. But the degree of performance improvement may be limited due to the
processor’s architecture and the nature of the application itsel
What is Pipelining?

Pipelining is the process of accumulating instruction from the processor through a pipeline. It
allows storing and executing instructions in an orderly process. It is also known as pipeline
processing.
Pipelining is a technique where multiple instructions are overlapped during execution.
Pipeline is divided into stages and these stages are connected with one another to form a pipe
like structure. Instructions enter from one end and exit from another end.
Pipelining increases the overall instruction throughput.
In pipeline system, each segment consists of an input register followed by a combinational
circuit. The register is used to hold data and combinational circuit performs operations on it.
The output of combinational circuit is applied to the input register of the next segment.
Pipelining
Pipeline system is like the modern day assembly line setup in factories. For example in a car
manufacturing industry, huge assembly lines are setup and at each point, there are robotic
arms to perform a certain task, and then the car moves on ahead to the next arm.
Types of Pipeline
It is divided into 2 categories:
Arithmetic Pipeline
Instruction Pipeline
Arithmetic Pipeline
Arithmetic pipelines are usually found in most of the computers. They are used for floating
point operations, multiplication of fixed point numbers etc. For example: The input to the
Floating Point Adder pipeline is:
X = A*2^a
Y = B*2^b
Here A and B are mantissas (significant digit of floating point numbers), while a and b are
exponents.
The floating point addition and subtraction is done in 4 parts:
Compare the exponents.
Align the mantissas.
Add or subtract mantissas
Produce the result.
Registers are used for storing the intermediate results between the above operations.
Instruction Pipeline
In this a stream of instructions can be executed by overlapping fetch, decode and execute
phases of an instruction cycle. This type of technique is used to increase the throughput of the
computer system.
An instruction pipeline reads instruction from the memory while previous instructions are
being executed in other segments of the pipeline. Thus we can execute multiple instructions
simultaneously. The pipeline will be more efficient if the instruction cycle is divided into
segments of equal duration.
Pipeline Conflicts
There are some factors that cause the pipeline to deviate its normal performance. Some of
these factors are given below:
1. Timing Variations
All stages cannot take same amount of time. This problem generally occurs in instruction
processing where different instructions have different operand requirements and thus
different processing time.
2. Data Hazards
When several instructions are in partial execution, and if they reference same data then the
problem arises. We must ensure that next instruction does not attempt to access data before
the current instruction, because this will lead to incorrect results.
3. Branching
In order to fetch and execute the next instruction, we must know what that instruction is. If
the present instruction is a conditional branch, and its result will lead us to the next
instruction, then the next instruction may not be known until the current one is processed.
4. Interrupts
Interrupts set unwanted instruction into the instruction stream. Interrupts effect the execution
of instruction.
5. Data Dependency
It arises when an instruction depends upon the result of a previous instruction but this result is
not yet available.
Advantages of Pipelining
The cycle time of the processor is reduced.
It increases the throughput of the system
It makes the system reliable.
Disadvantages of Pipelining
The design of pipelined processor is complex and costly to manufacture. The instruction
latency is more.
What is a Multicore Processor?
A multi-core processor is an integrated circuit with two or more processors
connected to it for faster simultaneous processing of several tasks, reduced power
consumption, and for greater performance. Generally, it is made up of two or more
processors that read and execute program instructions.

In other words, on a single chip, a multi-core processor comprises numerous


processing units, or "Cores," each of which has the potential to do distinct tasks. For
instance, if you are performing many tasks at once, such as watching a movie and
using WhatsApp, one core will handle activities like watching a movie while the other
handles other responsibilities like WhatsApp.

A dual-core configuration is comparable to having several different processors


installed on the same computer, but the connection between them is faster because
the two CPUs are plugged into the same socket. Several instructions in parallel may
be executed by individual cores, boosting the speed of software built to make use of
the architecture's unique features.

As compared to a single-core processor, a dual-core processor usually is twice as


powerful in ideal circumstances. In actuality, performance gains of around 50% are
expected: a dual-core CPU is roughly 1.5 times as powerful as a single-core
processor.
As single-core processors hit their physical limits of complexity and speed, multi-core
computing is becoming more popular. In modern times, the majority of systems are
multi-core. Many-core or massively multi-core systems refer to systems with a huge
number of CPU cores, such as tens or hundreds.

In the early 2000s, Intel and AMD released the first multicore processors. In modern
times, CPUs come with two ("dual-core"), four ("quad-core"), six ("hexa-core"), and
eight ("octa-core") cores ("octo-core"). FPGA-based processors contain up to 100
physical cores and 1000 effective independent cores (Field Programmable Gate
Arrays).

Architecture of Multicore Processor


A multi-core processor's design enables the communication between all available
cores, and they divide and assign all processing duties appropriately. The processed
data from each core is transmitted back to the computer's main board
(Motherboard) via a single common gateway once all of the processing operations
have been finished. This method beats a single-core CPU in terms of total
performance.

Advantages of Multi-Core Processor


Multicore processors have a number of advantages (pros), including:

Performance
A multi-core CPU, by nature, can do more work as compared to a single-core
processor. The spacing between the cores of an integrated circuit allows for faster
clock rates. As a result, the signals do not need to travel a large distance to reach
their target and are also persistent. When compared to using a separate processor,
the speeds are far quicker.

Reliability
In multi-core CPUs, the software is always assigned to different cores. When one
piece of software fails, the others remain unaffected. Whenever a defect arises, it
affects only one core. As a result, multi-core CPUs are better able to resist faults.

Software Interactions
Even if the software is running on multiple cores, it will communicate with one
another. Spatial and temporal isolation is a process that a multi-core processor goes
through. Core threads are never delayed as a result of these processes.

Multitasking
An operating system can use a multi-core CPU to run two or more processes at the
same time, even if many programmes may be executed at the same time. A
photoshop application, for example, can be used to perform two jobs at once.

Power Consumption
Multitasking with a multi-core CPU, on the other hand, requires less power. Only the
part of the CPU that generates heat will be used. The power consumption is
eventually minimized, resulting in less battery utilization. Some operating systems, on
the other hand, need more resources as compared to others.

Obsolescence Avoidance
Architects can avoid technology obsolescence and increase maintainability by using
multicore CPUs. Chipmakers are using the most recent technological advancements
in their multicore CPUs. Single-core chips are becoming increasingly difficult to come
by as the number of cores increases.

Isolation
Multicore processors may increase (but do not guarantee) geographical and
temporal isolation when compared to single-core systems. Software on one core is
less likely to impact software on the other if both cores are executing on the same
single-core. This decoupling happens due to geographical and temporal isolation
(threads on one core are not delayed by threads on another core). With the help of
limiting the impact of errors to a single core, multicore processing can increase
robustness. When executing mixed-criticality programmes separately, this enhanced
isolation is very important (safety-critical, mission-critical, and security-critical).

Some other key points of benefits of Multicore Processor:

o When compared to single-core processors, a multicore processor has the


potential of doing more tasks.
o Low energy consumption when doing many activities at once.
o Data takes less time to reach its destination since both cores are integrated on
a single chip.
o With the use of a small circuit, the speed can be increased.
o Detecting infections with anti-virus software while playing a game is an
example of multitasking.
o With the use of low frequency, it can accomplish numerous tasks at the same
time.
o In comparison to a single-core processor, it is capable of processing large
amounts of data.

Disadvantages of Multi-Core Processors


We will go through some of the limitations (drawbacks) of a multi-core processor,
including:

Application Speed
Despite the fact that a multi-core CPU is designed for multitasking, its performance is
insufficient. It has a tendency to bounce from one core to the next each time when
an application is processing. As a result, the cache fills up, increasing its speed.

Jitter
More interference develops as the number of cores in a multi-core CPU increase,
resulting in excessive jitters. As a result, your operating system's program
performance may suffer, and frequent failures may occur. Only by using appropriate
synchronization and a microkernel will the user be able to deal with jitter.

Analysis
When you are doing two or more things at once, you will need to employ additional
memory models. In a multi-core machine, this makes analysis tough. Time limitations,
in particular, are difficult to determine and may be inaccurate.

Furthermore, the interference analysis becomes more complex as the number of


cores increases. Consequently, the O/S will be unable to deliver produce the
promised results.

Resource Sharing
A multi-core processor shares a variety of resources, both internal and external.
Networks, system buses, and main memory are among these resources.
Consequently, any program running on the same core will have a higher chance of
being interrupted. Both geographical and temporal isolation can occur in this form of
interference.

Software Interference
Due to resource sharing, software interference can cause problems with spatial and
temporal isolation. If there are additional cores, this chance increases even more. The
presence of more cores implies a greater number of interference routes. It is nearly
impossible to examine all possible interference pathways.

Some other key points of limitations of Multicore Processor:

o Although it contains several processors, it is not twice as fast as a simple


processor.
o The task of managing is more complicated as compared to managing a
single-core CPU.
o The performance of a multi-core processor is entirely dependent on the tasks
that users execute.
o If other processors demand linear/sequential processing, multi-core
processors take longer to process.
o The battery drains more quickly.
o Its consumption of power is so high as compared to a simpler processor.
o Furthermore, in comparison to a single-core processor, it is more expensive.

Why is Multi core Processor used?


The configuration is similar to a dual-core processor. Multi-core processors are
classified according to the number of cores and the types of cores. A multi-core
CPU's objective is to obtain great performance. It was designed to get past the
physical limitations of a single-core CPU.

Supportive Operating Systems of Multicore Processor include:

o Linux
o Microsoft Windows (Windows XP or above)
o Most BSD-based systems
o Solaris
o Mac OS X

A brief history of multicore processors


Because the companies who created the initial chip-based processors could only put
one processor on a single chip, they could only fit one processor on a single chip.
Chipmakers were able to construct chips with more circuits as chip-making
technology progressed, and finally, chipmakers were able to make chips with more
than one processor, resulting in the multi-core chip.

In 1998, the first multi-core processor was invented by Kunle Olukotun, a professor
of electrical engineering at Stanford, and his students. Multicore chips were first
commercially accessible in 2005 from Advanced Micro Devices (AMD) and Intel.
Almost every chip maker has since started to create multicore processors.

Where are multicore processors used?


In modern times, multicore processors are found in the majority of devices such as
tablets, desktops, laptops, smartphones and gaming systems.

The two core options provided demonstrate how a processor's model does not tell
the entire story regarding performance. As compared to a dual-core i5, the
performance of a quad-core i5 is substantially superior, and the price of the
computer will reflect this. All of the current laptop models for the i5 model are dual-
core, whereas all of the desktop models are quad-core as of this writing. Because
laptop versions are dual-core rather than quad-core, an i5 in a laptop will have
poorer performance than an i5 on a desktop. The dual-core type is better suited to
portable laptops that require longer battery life and consumes less power, but a
desktop uses a CPU that uses more power, such as the quad-core model, as it does
not require battery life. Some applications of the multicore processor are as follows:

o Games with high graphics, such as Overwatch and Star Wars Battlefront, as
well as 3D games.
o The multicore processor is more appropriate in Adobe Premiere, Adobe
Photoshop, iMovie, and other video editing software.
o Solidworks with computer-aided design (CAD).
o High network traffic and database servers.
o Industrial robots, for example, are embedded systems.
Multiprocessor Systems

Most computer systems are single processor systems i.e they only have one processor.
However, multiprocessor or parallel systems are increasing in importance nowadays. These
systems have multiple processors working in parallel that share the computer clock, memory,
bus, peripheral devices etc. An image demonstrating the multiprocessor architecture is

−Multiprocessor Systems
Types of Multiprocessors
There are mainly two types of multiprocessors i.e. symmetric and asymmetric
multiprocessors. Details about them are as follows −
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating system and
they all communicate with each other. All the processors are in a peer to peer relationship i.e.
no master - slave relationship exists between them.
An example of the symmetric multiprocessing system is the Encore version of Unix for the
Multimax Computer.
Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a master processor
that gives instruction to all the other processors. Asymmetric multiprocessor system contains
a master slave relationship.
Asymmetric multiprocessor was the only type of multiprocessor available before symmetric
multiprocessors were created. Now also, this is the cheaper option.
Advantages of Multiprocessor Systems
There are multiple advantages to multiprocessor systems. Some of these are −
More reliable Systems
In a multiprocessor system, even if one processor fails, the system will not halt. This ability
to continue working despite hardware failure is known as graceful degradation. For example:
If there are 5 processors in a multiprocessor system and one of them fails, then also 4
processors are still working. So the system only becomes slower and does not ground to a
halt.
Enhanced Throughput
If multiple processors are working in tandem, then the throughput of the system increases i.e.
number of processes getting executed per unit of time increase. If there are N processors then
the throughput increases by an amount just under N.
More Economic Systems
Multiprocessor systems are cheaper than single processor systems in the long run because
they share the data storage, peripheral devices, power supplies etc. If there are multiple
processes that share data, it is better to schedule them on multiprocessor systems with shared
data than have different computer systems with multiple copies of the data.
Disadvantages of Multiprocessor Systems
There are some disadvantages as well to multiprocessor systems. Some of these are:
Increased Expense
Even though multiprocessor systems are cheaper in the long run than using multiple
computer systems, still they are quite expensive. It is much cheaper to buy a simple single
processor system than a multiprocessor system.
Complicated Operating System Required
There are multiple processors in a multiprocessor system that share peripherals, memory etc.
So, it is much more complicated to schedule processes and impart resources to processes.than
in single processor systems. Hence, a more complex and complicated operating system is
required in multiprocessor systems.
Large Main Memory Required
All the processors in the multiprocessor system share the memory. So a much larger pool of
memory is required as compared to single processor systems.

You might also like