DS Lec03
DS Lec03
Software Concepts
DS Software
Distributed
Systems
Multi- Multi-
Processor Computer
Time
Symmetric
sharing
10/24/2024 Distributed Systems 6
Distributed Systems : Software
System Software Hardware Main goal
Network Loosely Loosely Offer local service for
operating system coupled coupled remote clients
Additional layer on Provide distribution
Middleware
top of NOS transparency
Distributed Tightly Loosely provide user with
operating system coupled coupled transparency
Multiprocessor Provide the feeling of
Tightly Tightly
Time Sharing working with single
coupled coupled
systems processor
10/24/2024 Distributed Systems 7
Multiprocessor OS
OS for each CPU
Each CPU Has Its Own Operating System:
The simplest possible way to organize a
multiprocessor operating system is to:
divide memory into partitions = No. of CPUs
give each CPU its own
▪ private memory
▪ private copy of the operating system.
The n CPUs operate as n independent computers.
10/24/2024 Distributed Systems 9
OS for each CPU
Reduced Resource
Limited Scalability
Conflicts
Less Efficient
Specialized Processors
Resource Utilization
10/24/2024 Distributed Systems 13
Symmetric Multiprocessors
In SMP, two or more identical processors are
connected to a single, shared main memory
have full access to all input/output devices
controlled by a single OS instance that treats all processors equally.
There is one copy of the operating system in memory, but any
CPU can run it.
When a system call is made, the CPU on which the system call
was made traps to the kernel and processes the system call.
A mutex (i.e., lock) is associated with the OS.
When a CPU wants to run operating system code, it must first
acquire the mutex.
Increased Hardware
Fault Tolerance
Costs
10/24/2024 Distributed Systems 16
SMP vs AMP
Symmetric Asymmetric
Parameter
Multiprocessing Multiprocessing
Processor types Identical Not identical
Tasks of the OS Any symmetric CPU The master processor.
the master manages all
Communication Via shared memory.
the slave processors.
Task assignment via a prepared queue list. Via master processor
very complex due to the
very simple and
Architecture need for CPU
straightforward.
synchronization.
Expensive due to comparatively Cheaper
Expense complicated architectural due to simpler
design. architectural design.
10/24/2024 Distributed Systems 17
Multiprocessor Scheduling
On a uniprocessor, scheduling is one dimensional. The only question that
must be answered (repeatedly) is: ''Which process should be run next?‘’
On a multiprocessor, scheduling is two dimensional.
The scheduler has to decide which process to run and which CPU to run
it on.
This extra dimension greatly complicates scheduling on multiprocessors.
Another complicating factor is that in some systems, all the processes are
unrelated whereas in others they come in groups.
An example of the former situation is a timesharing system in which
independent users start up independent processes.
The processes are unrelated and each one can be scheduled without
regard to the other ones
Distributed applications
Network
10/24/2024 Distributed Systems 24
Network Operating System
Intermediate stage between
independent individual workstations and
a distributed SW environment.
Independent machines with significant interaction:
They may run different operating systems.
Servers support interaction of distributed pieces.
Network File System (NFS) is the most obvious and the strongest
combining force.
Extensive communication - location dependent.
Client/server - service model.
File servers - file sharing.
WWW service - newest addition.
Distributed applications
Distributed OS applications
Kernel Kernel Kernel
Network
10/24/2024 Distributed Systems 33
Fully Distributed Systems
Programming and user interface provides a
virtual uni-processor.
Built on top of distributed heterogeneous machines.
New approaches and implementations to user
and system software are generally required.
Long development time.
Execution overhead is the REAL challenge
Message latency and overhead are usually the right
place to start looking
10/24/2024 Distributed Systems 34
Fully Distributed Systems
Familiar uni-processor challenges are all
present
They become more challenging when generalized
for a truly distributed implementation
Synchronization Squared.
Scheduling multiplied.
Programming model complication.
Shared and Virtual Memory complications.
10/24/2024 Distributed Systems 35
Fully Distributed Systems
Distribution brings its own complications
Load balancing.
Cache coherence.
Fault tolerance.
Process migration.