Multiprocessing
Dear reader,
Today, I would like to share the information about one of the concepts of
Computer system, Multiprocessing. Now a day's all Computer come under this
category. In simple words, we are doing so many operations at the same time
with a computer system. For example, we are typing some letter, hearing music,
downloading some file from the internet and others. All these works are running
at the same time. This methodology is known as Multiprocessing. Let us move for
detail discussion.
Multiprocessing means,
it is the capability of a computer system to perform more than one
operation/task/job at the same time. Multiprocessor operating system means
different types of jobs/tasks are performing with more than one Central
Processing Units in one computer. In this case, all CPUs are in communication,
means that they can share different types of computer system peripherals like
memory, bus, some I/O devices. Hence, this type of computer systems is also
known as Tightly coupled systems or Symmetric Systems.
To process huge data
with high speed, we use this type of computer systems. Ex: Satellite control
systems, Weather forecasting systems. The following figure brings an idea about
the architecture of multiprocessing operating systems.
Under multiprocessing
computer systems, every processor runs on its own operating system, by
communicating with one another. This type of relationship referred as
Master-Slave relationship. That means, when assigning a job, the main
processor(master) controls all the operations regarding the job. This method is very useful. Because this type of
computer systems will share the available resources. Therefore, we can complete
a task within a short period of time, that compare with single processor computer
systems. The other advantage is, suppose one of the communicating processors gets a failure, there is no terminating the process. But, it is not possible in
the case of a single processor system.
To achieve this, we must
assure with processor and motherboard support. The entire work/job/task has
been controlled by the operating system by allocating various tasks to
different processors to perform. This method follows the threading concept.
Which means, single operating can be divided into a number of small tasks(knows
as subroutines) that can run independently on their own processor
simultaneously.
Don't get confuse with
multiprocessing and multiprogramming. Multiprogramming refers the
execution of multiple programs by a single processor at a given time. But
multiprocessor means the execution of a single application by several
processors. Multiprocessor means, parallel execution of multiple processes
using more than one processor. This is not the meaning to execute a single
process that needs more processors.
In the beginning days,
processor cost was very high and peripherals were very low speed. The problem
is, when the computer executes a program means, it has to access required
peripherals. But all these peripherals are having less computing/processing
speed, which results in CPU under waiting. The first Multiprogramming computer
system was Leo III and designed by Lyons and Co. With the technology of
Virtual memory and Virtual machines, multiprogramming was enhanced.
Multiprogramming never give assurance that an application/program/job/task will
run in a timely manner. Multiprocessing systems that treat all CPUs equally are
known as Symmetric Multiprocessing Systems(both hardware and software are
connected to single shared main memory) and all CPUs are not equal, at that
time system resources are may be divided as either Asymmetric Multiprocessing
or Clustered Processing or Non-Uniform memory access multiprocessing.
Mainly there are 3 types
of problems with multiprocessor system. Namely, Locking System, Shared Data and
False Sharing. Let us discuss these terms one by one.
Locking System:
Locks will help us to write the correct code of statements for multiprocessors.
As per multiprocessor concept, it should increase the total performance by executing
different tasks concurrently on different CPUs. That means to provide safe
access to the shared resources among multiple processors. Locks provide us
serializable access.
Shared Data:
Cache coherence protocol allows multiprocessors to access the shared data as
serializable manner. Delays in serialization will impact on system performance.
Cache coherence traffic and interconnection network may also reduce the system
performance. It can be eliminated by avoiding the sharing of data.
False Sharing:
This type of problem comes when unrelated data items used by different
processors which are located next to each other in memory and sharing a single
cache line(memory is stored within the cache system in units is known as a
cache line). False sharing comes when threads on different processors try to
modify variables that reside on the same cache line. It is a popular
performance issue on SMP(Symmetrical Multi-Processing) systems.
With this basic
information, I hope you would understand the importance of multiprocessing. See
you in my next article. Please feel free to give comments or suggestions in the
below section.
Thank You.