0% found this document useful (0 votes)
64 views60 pages

Multiprocessor Systems:: Advanced Operating System

A tightly coupled multiprocessor system has multiple CPUs that are closely connected, often sharing a central memory. They have high performance and efficiency but are more expensive. A loosely coupled system connects independent computers over a network, using message passing for communication. They are less expensive but less efficient. The key difference is that tightly coupled systems have shared memory and closer integration of components, while loosely coupled systems have distributed memory and less interdependence between nodes.

Uploaded by

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

Multiprocessor Systems:: Advanced Operating System

A tightly coupled multiprocessor system has multiple CPUs that are closely connected, often sharing a central memory. They have high performance and efficiency but are more expensive. A loosely coupled system connects independent computers over a network, using message passing for communication. They are less expensive but less efficient. The key difference is that tightly coupled systems have shared memory and closer integration of components, while loosely coupled systems have distributed memory and less interdependence between nodes.

Uploaded by

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

AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH

CSC5012: ADVANCED OPERATING SYSTEM


Lecture: # 7 Week: # 4 Semester: Fall 2021-2022

Multiprocessor Systems

Instructor: Dr. Afroza Nahar, Associate Professor


Department of Computer Science, Faculty of Science & Technology.
[email protected]
OUTLINES
 Introduction
 Processor Coupling
 Loosely Coupled Systems
 Tightly Coupled Systems

 Multiprocessor Interconnections
 Types of Multiprocessor O/S
 Functions of Multiprocessor O/S
 Multiprocessor Synchronization

11/08/2021 Dr. Afroza Nahar 2


WHAT DOES MULTIPROCESSOR
MEAN?
 A multiprocessor is a computer system
with two or more central processing units
(CPUs), with each one sharing the common
main memory as well as the peripherals.

 key objective
 to boost the system’s execution speed,
with other objectives being fault
tolerance and application matching.

 to improve computing speeds,


performance and cost-effectiveness, as
well as to provide enhanced availability
and reliability.
BENEFITS OF USING A
MULTIPROCESSOR
 Enhanced performance
 Multiple applications
 Multiple users
 Multi-tasking inside an application
 High throughput and/or responsiveness
 Hardware sharing among CPUs
COMMUNICATION ARCHITECTURE OF A
MULTIPROCESSOR
Message Passing
 Independent address space for every processor
 Processor communication by means of message passing
 Processors include private memories
 Concentrates attention on high-priced, non-local operations
 Shared Memory
 Processor communication is done by means of a shared address space
 Processor communication is done by means of shared memory read/write
 Convenient on small-scale devices
 Lower latency
 Non-uniform memory access (NUMA) or symmetric multiprocessing (SMP)
MULTICOMPUTER
 A multicomputer system is a computer system with multiple
processors that are connected to solve a problem.
 Each processor has its own memory, and it is accessible by that
particular processor and those processors can communicate with
each other via an interconnection network.
A MULTIPROCESSOR SYSTEM
 A collection of a number of standard processors put together in
an innovative way to improve the performance/speed of
computer hardware.
 Feature of this architecture :
 to provide high speed at low cost in comparison to
uniprocessor.

 Aim:
 to support high performance through multiple CPUs

 Main Goal:
 to make the number of CPUs transparent to the application.
A MULTIPROCESSOR SYSTEM…
 Achieving such transparency is relatively easy because the
communication between different (parts of) applications uses the
same primitives as those in multitasking uni-processor operating
systems.
 Multiprogramming is more appropriate to describe this concept,
which is implemented mostly in software, whereas multiprocessing
is more appropriate to describe the use of multiple hardware
CPUs.
 The multiprocessor system is generally characterized by
 increased system throughput and application speedup

 parallel processing.
WHY CHOOSE A
MULTIPROCESSOR? 
 A single CPU can only go so fast, use more than one CPU
to improve performance.
 Multiple users
 Multiple applications
 Multi-tasking within an application
 Responsiveness and/or throughput
 Share hardware between CPUs
ADVANTAGES
 Great Reliability
 If due to any reason, any one processor gets fails then do not worry because,
entire system will do work properly.

Improve Throughput
 Enhancing the throughput of system, entire system is improved,

Cost Effective System


 Multiprocessor systems are cost effective compared to single processor
system in long life because this system is capable to share all input/output
devices, power supplies system, and data storage center.

Parallel Processing
 Multiprocessor O/S gets high performance due to parallel processing. In this
system, single job is divided into various same small jobs, and execute them
like as Parallel nature.
DISADVANTAGES 
 Multiprocessor has complicated nature in both form such as H/W
and S/W.
 It is more expensive due to its large architecture.
 System has a daunting task for scheduling processes due to its
shareable nature.
 System needs large memory due to sharing its memory with other
resources.
 Its speed can get degrade due to fail any one processor.
 It has more time delay when processor receives message and take
appropriate action.
 It has big challenge related to skew and determinism.
 It needs context switching which can be impacted its
performance.
EXAMPLES OF MULTIPROCESSOR
OPERATING SYSTEM
 Examples for Symmetric Multiprocessor – Windows NT, Solaris,
Digital UNIX, OS/2 & Linux.
Examples for Asymmetric Multiprocessor – SunOS Version 4, IOS
Other Examples are 
 Intel Nehalem – Beckton, Westmere, Sandy Bridge
 AMD Opteron – K10 (Barcelona, Magny Cours); Bulldozer
 ARM Cortex A9, A15 MPCore
 Oracle (Sun) UltraSpare T1, T2, T3, T4 (Niagara)
PROCESSOR COUPLING
 Multiprocessor systems have more than one processing unit
sharing memory/peripheral devices. They have greater computing
power, and higher reliability.

 Multiprocessor systems are classified into two

 Tightly-coupled
 Loosely-coupled
TIGHTLY- COUPLED SYSTEMS
 A tightly coupled system is an approach of system design and
computing where every hardware and software components are
linked together in such a manner that each component is dependent
upon each other.

Tightly coupled system architecture promotes interdependent


applications and code.

Tight coupling is mainly used in enterprise systems and applications


that work on the interconnectivity and inter-processing of two or more
systems simultaneously to deliver a cohesive/integrated solution.

Each processor is assigned a specific duty but processors work in


close association, possibly sharing one memory module.
TIGHTLY- COUPLED SYSTEMS…
 The systems contain multiple CPUs that are connected at the
bus level.

 These CPUs may have access to a central shared memory (SMP)


or may participate in a memory hierarchy with both local and
shared memory (NUMA).
 The IBM p690 Regatta is an example of a high end SMPis system.
TIGHTLY- COUPLED SYSTEMS…
 Tightly-coupled systems tend to be much more energy efficient than
clusters. This is due to fact that considerable economies can be realized
by designing components to work together from the beginning in tightly-
coupled systems.
TIGHTLY- COUPLED SYSTEMS…
1.Tightly coupled systems have a shared memory concept.

2.The interconnections in a tightly coupled system are Processor-memory


interconnection network (PMIN), I/O-Processor interconnection network
(IOPIN) and the interrupt-signal interconnection network (ISIN).

3.The data rate of tightly coupled system is high.

4.The tightly coupled system is more expensive but compact in size.

5.The tightly coupled system can take a higher degree of interaction


between processes and is efficient for high-speed and real-time
processing.
TIGHTLY- COUPLED SYSTEMS…
7. They are widely used in parallel processing systems.
8. Throughput in this type of systems is high.
9.  Power consumption is low.
10. System cache memory assigns processes according to the need
of processing.
11. Security is high.
12. It operates on single operating system.
13. It has high scalability.
14. It has low delay.
15. Contention is high in tightly coupled system.
LOOSELY-COUPLED SYSTEMS
 A loosely coupled system is an approach of interconnecting the components
in a system or network so that each of its components has or makes use of
little or no knowledge of the definitions of other separate components.

 The goal of a loose coupling architecture is to reduce the risk that a change
made within one element will create unanticipated changes within other
elements.

 Loose coupling is mainly used in enterprise networks and systems to reduce


the amount and intensity of risk found in highly dependent systems. A system
with multiple components is less likely to have performance issues when
those components are loosely coupled.

 For example, in a client/server computing architecture, disconnecting the


client from the server will result in the unavailability of some functions but
the client will still be able to work independently of the server.
LOOSELY-COUPLED SYSTEMS…
LOOSELY-COUPLED SYSTEMS…
The systems often referred to as clusters are based on multiple
standalone single or dual processor commodity computers
interconnected via a high-speed communication system.

 A Linux Beowulf is an example of a loosely-coupled system

 Nodes in this system are usually inexpensive commodity


computers and can be recycled as independent machines upon
retirement from the cluster.

 This systems are not much energy efficient when compared with
tightly coupled.
LOOSELY-COUPLED SYSTEMS…
1.Loosely coupled systems have a distributed memory concept.
2.The interconnection network in a loosely coupled system is
Message Transfer System (MTS).
3.Data rate of the loosely coupled system is low.
4.The loosely coupled system is less expensive but larger in size.
5.Loosely coupled system is efficient when the tasks running on
different processors have minimal interaction between them.
LOOSELY-COUPLED SYSTEMS…
7. They are widely used in distributed computing systems.
8. Throughput in this type of systems is low.
9. Power consumption is high.
10. Each process has its own cache memory.
11. Security is low in this type of systems.
12. It operates on multiple operating systems.
13. It has low scalability.
14. It has high delay.
15. Contention is low in loosely coupled system.
DIFFERENCE BETWEEN LOOSELY COUPLED AND TIGHTLY COUPLED
SYSTEMS

BASIS OF COMPARISON LOOSELY COUPLED SYSTEMS TIGHLY COUPLED SYSTEMS

Loosely coupled systems have a Tightly coupled systems have a


Memory Concept distributed memory concept.   shared memory concept.  

The interconnections in a tightly


coupled system are Processor-
The interconnection network in
a loosely coupled system is memory interconnection network
Interconnection Message Transfer System (MTS).
(PMIN), I/O-Processor
interconnection network (IOPIN)
  and the interrupt-signal
interconnection network (ISIN).  

Data rate of the loosely coupled The data rate of tightly coupled
Data Rate system is low.   system is high.  
DIFFERENCE BETWEEN LOOSELY COUPLED AND TIGHTLY
COUPLED SYSTEMS

BASIS OF
COMPARISON LOOSELY COUPLED SYSTEMS TIGHLY COUPLED SYSTEMS

The loosely coupled system is less The tightly coupled system is more
Cost expensive but larger in size.   expensive but compact in size.  

Loosely coupled system is efficient The tightly coupled system can take a
when the tasks running on different higher degree of interaction between
Efficiency processors have minimal processes and is efficient for high-speed
interaction between them.   and real-time processing.  

They are widely used in distributed They are widely used in parallel processing
Application computing systems.   systems.  

Throughput in this type of systems Throughput in this type of systems is high.


Throughput is low.    

Power Power consumption is high.   Power consumption is low.  


DIFFERENCE BETWEEN LOOSELY COUPLED AND TIGHTLY
COUPLED SYSTEMS

BASIS OF
COMPARISON LOOSELY COUPLED SYSTEMS TIGHLY COUPLED SYSTEMS

System cache memory


Each process has its own
Cache Memory cache memory.   assigns processes according
to the need of processing.  

Security Security is low Security is high.  

Operating It operates on multiple It operates on single


System operating systems.   operating system.  

Scalability It has low scalability.   It has high scalability.  

Delay It has high delay.   It has low delay.  


MULTIPROCESSOR
INTERCONNECTIONS
 Bus-oriented System

 Crossbar-connected System

 Hyper cubes

 Multistage Switch-based System


BUS-ORIENTED MULTIPROCESSOR
INTERCONNECTION
 Processors and memory are connected by a common bus.

 Communication between processors (P1, P2, P3 and P4) and with


globally shared memory is possible over a shared bus
DISADVANTAGES
 The above architecture gives rise to a problem of Contention at two
points, one is shared bus and the other is shared memory.
HOW TO OVERCOME FROM
THIS PROBLEM ?
Two Ways to Overcome
 Cache along with the Shared Memory
 Cache associated with each individual processor
CACHE WITH SHARED
MEMORY
CACHE WITH EACH
INDIVIDUAL PROCESSOR
TECHNIQUES
 Techniques which can be employed to decrease the
impact of bus and memory saturation in bus-oriented
system.
 Wider Bus Technique

 Split Request / Reply Protocols


WIDER BUS TECHNIQUE
 A bus is made wider so that more bytes can be transferred in a
single bus cycle.

 In other words, a wider parallel bus increases the bandwidth by


transferring more bytes in a single bus cycle.
SPLIT REQUEST / REPLY PROTOCOLS
 The memory request and reply are split into two individual works
and are treated as separate bus transactions.
As soon as a processor requests a block, the bus released to other
user, meanwhile it takes for memory to fetch and assemble the
related group of items.
OTHER SCHEMES
 Individual processors may or may not have private/cache
memory.
 Individual processors may or may not attach with input/ output
devices.
 Input/output devices may be attached to shared bus.
 Shared memory implemented in the form of multiple physical
banks connected to the shared bus.
CROSSBAR CONNECTED
SYSTEM
 It is a grid structure of processor and memory modules.
 Every cross point of grid structure is attached with switch. By looking at the
Figure, it shows simultaneous access between processor and memory modules
as N number of processors are provided with N number of memory module.
Thus each processor accesses a different memory module.
CROSSBAR CONNECTED
SYSTEM…
Crossbar needs N2 switches for fully connected network between
processors and memory.

Processors may or may not have their private memories


HYPERCUBES SYSTEM
HYPERCUBES SYSTEM…
This architecture has some advantages over other
architectures of multiprocessing system.
 In an n-degree hypercube architecture, we have:
 2n nodes (Total number of processors)

 Nodes are arranged in n-dimensional cube, i.e. each node is


connected to n number of nodes.
 Each node is assigned with a unique address which lies between
0 to 2n–1
 The adjacent nodes (n-1) are differing in 1 bit the nth node is having
maximum ‘maximum ‘n’ inter-node distance.’ 
HYPERCUBES SYSTEM…
3-degree hypercube will have 2n nodes, i.e. 23 = 8 nodes
 Nodes are arranged in 3-dimensional cube, that is, each node is
connected to 3 no. of nodes.
 Each node is assigned with a unique address, which lies between
0 to 7 (2n –1), i.e., 000, 001, 010, 011, 100, 101, 110, 111.
 Two adjacent nodes differing in 1 bit (001, 010) and the 3(001,
010) and the 3rd (nth ) node is having maximum ‘3’ inter-node
distance (100)
HYPERCUBES SYSTEM…
 Hypercube provide a good basis for scalable system because its
communication length grows logarithmically with the number of
nodes.

 It provides a bi-directional communication between two


processors.

 It is usually used in loosely coupled multiprocessor system


because the transfer of data between two processors goes through
several intermediate processors.

 The longest internodes delay is n-degree.

 To increase the input/output bandwidth the input/output devices


can be attached with every node (processor).
HYPERCUBES SYSTEM…
 A N input-output connections contains K= log2N stages of N/2
switches at each stage. In simple words, N*N processor-processor-
memory interconnection network requires

(N/2) x = log N switches.

 In a 8X8 process-memory interconnection network requires (8/2*


log 8) = 4*3= 12 switches. Each switch acts as 2X2 crossbar. 
MULTISTAGE SWITCH BASED
SYSTEM
 Multistage Switch Based System permits simultaneous connection
between several input-output pairs.
 It consists of several stages of switches which provide multistage
interconnection network.

 The 2×2 crossbar switch is used in the multistage network. It has 2


inputs (A & B) and 2 outputs (0 & 1). To establish the connection
between the input & output terminals, the control inputs CA &
CB are associated.
TYPES OF MULTIPROCESSOR O/S
The multiprocessor o/s are complex in comparison to
multiprograms on a uniprocessor operating system because
multiprocessor executes tasks concurrently.

 Therefore, it must be able to support the concurrent execution of


multiple tasks to increase processors performance.
TYPES OF MULTIPROCESSOR
O/S…
 Depending upon the control structure and its organization the three
basic types of multiprocessor operating system are:

 Separate Supervisor

 Master- Slave

 Symmetric Supervision
SEPARATE SUPERVISOR
 In separate supervisor system each process behaves
independently.

 Each system has its own operating system which manages local
input/output devices, file system and memory well as keeps its
own copy of kernel, supervisor and data structures, whereas some
common data structures also exist for communication between
processors.

 The access protection is maintained, between processor, by using


some synchronization mechanism like semaphores
LIMITATIONS
 Such architecture will face the following problems:
 Little coupling among processors.
 Prallel execution of single task.
 During process failure it degrades.
 Inefficient configuration as the problem of replication arises
between supervisor/kernel/data structure code and each
processor
MASTER- SLAVE
 In master-slave, out of many processors one processor behaves as
a master whereas others behave as slaves.
 The master processor is dedicated to executing the operating
system.
 It works as scheduler and controller over slave processors. It
schedules the work and also controls the activity of the slaves.
Therefore, usually data structures are stored in its private memory.
 Slave processors are often identified and work only as a
schedulable pool of resources, in other words, the slave processors
execute application programmes.
MASTER- SLAVE …
This arrangement allows the parallel execution of a single task by
allocating several subtasks to multiple processors concurrently.
Since the operating system is executed by only master processors
this system is relatively simple to develop and efficient to use.

 Limited scalability is the main limitation of this system, because


the master processor become a bottleneck and will consequently
fail to fully utilize slave processors.
SYMMETRIC
In symmetric organization all processors configuration are
identical.
 All processors are autonomous and are treated equally. To make
all the processors functionally identical, all the resources are
pooled and are available to them.
 This operating system is also symmetric as any processor may
execute it. In other words there is one copy of kernel that can be
executed by all processors concurrently.
To that end, the whole process is needed to be controlled for
proper interlocks for accessing scarce data structure and pooled
resources.
SYMMETRIC…
 The simplest way to achieve this is to treat the entire operating
system as a critical section and allow only one processor to execute
the operating system at one time.
 This method is called ‘floating master’ method because in spite of
the presence of many processors only one operating system exists.
 The processor that executes the operating system has a special
role and acts as a master.
 As the operating system is not bound to any specific processor,
therefore, it floats from one processor to another.
SYMMETRIC…
 Parallel execution of different applications is achieved by
maintaining a queue of ready processors in shared memory.

 Processor allocation is then reduced to assigning the first ready


process to first available processor until either all processors are
busy or the queue is emptied. Therefore, each idled processor
fetches the next work item from the queue
MULTIPROCESSOR O/S FUNCTIONS AND
REQUIREMENTS
 A multiprocessor operating system manages all the available
resources and schedule functionality to form an abstraction.

 It will facilitates programme execution and interaction with users.

 A processor is one of the important and basic types of resources


that need to be managed. For effective use of multiprocessors the
processor scheduling is necessary.
PROCESSORS SCHEDULING
 Processors scheduling undertakes the following tasks:

 Allocation of processors among applications in such a manner that will be


consistent with system design objectives. it affects the system throughput.

 Throughput can be improved by co-scheduling several applications together,


thus availing fewer processors to each.

 Ensure efficient use of processors allocation to an application. This primarily


affects the speedup of the system
PROCESSORS SCHEDULING…
 The two primary facets of OS support for
multiprocessing are:
 Flexible and efficient interprocess and synchronization
mechanism,
 Efficient creation and management of a large number
of threads of activity, such as processes or threads.
MEMORY MANAGEMENT
  In multiprocessors system memory management is highly
dependent on the architecture and inter-connection scheme.

 In loosely coupled systems memory is usually handled independently on a


pre-processor basis whereas in multiprocessor system shared memory may be
simulated by means of a message passing mechanism.

 In shared memory systems the operating system should provide a flexible


memory model that facilitates safe and efficient access to share data
structures and synchronization variables.
DEVICE MANAGEMENT
The third basic resource is Device Management but it has received
llittle attention in multiprocessor systems to date, because earlier
the main focus point is speedup of compute intensive application,
which generally do not generate much input/output after the
initial loading.

 Now, multiprocessors are applied for more balanced general-


purpose applications, therefore, the input/output requirement
increases in proportion with the realised throughput and speed
MULTIPROCESSOR
SYNCHRONIZATION
 Multiprocessor system facilitates parallel program execution and
read/write sharing of data and thus may cause the processors to
concurrently access location in the shared memory. Therefore, a
correct and reliable mechanism is needed to serialize this access.
This is called synchronization mechanism.
 The mechanism should make access to a shared data structure
appear atomic with respect to each other.
TECHNIQUES

 Test-and-Set

 Compare-and-Swap

 Fetch-and-Add

You might also like