Distributed System
M. NAJMUL ISLAM FAROOQUI
ASSTT. PROFESSOR, CED, SSUET.
2
Distributed System
A distributed system is a collection of autonomous systems that appear
to the users as a single coherent system
Systems do not share memory or a clock and communicate with each
other by exchanging messages over a communication network
Each computer has its own memory and runs its own OS
Resources owned and controlled by a computer are said to be local to it
CT-509 Distributed Systems
3
Distributed System
Resources owned and controlled by other computers are said to be remote
Accessing remote resources is more expensive because of communication
delays
The motive is to convert low-cost microprocessors to a single powerful
system
CT-509 Distributed Systems
4
Examples
The world wide web – information, resource sha
Clusters, network of workstations
Cloud computing platforms
Telecommunication systems
CT-576 Advanced Operating Systems
5
Distributed System
CT-509 Distributed Systems
6
Computers that are connected by a network may be spatially
separated by any distance.
They may be on separate continents, in the same building or in
the same room. Our definition of distributed systems has the
following significant consequences:
Concurrency
No global clock
Independent failures
CT-576 Advanced Operating Systems
7
World wide web
CT-576 Advanced Operating Systems
8
OpenStack Cloud Platform
CT-576 Advanced Operating Systems
9
5G architecture
CT-576 Advanced Operating Systems
10
Advanced Principles of Operating System
Other Tools,
Logs, & Data
Sources
Cloud Endpoint Office 365 SaaS + More
Azure, AWS, GCP, On & Server/VM Email and Apps Cloud Apps OT, IoT, SQL,
Premises & other 3rd
party clouds and more
Azure Active Directory
Defender for Cloud – Cross-Platform Cloud Security Posture Management (CSPM)
Discover
Monitor Classif
Protect y
Azure AD App Proxy
Beyond User VPN Azure Key Vault S3
Azure Backup
Security & Other Services
GitHub Advanced Security – Secure development and software supply chain
12
Architecture of Distributed System
CT-509 Distributed Systems
13
Advantages
Resource sharing
Hardware and software resources can be shared
Printer, Compiler, Text Editors, Databases, etc.
Enhanced performance
Rapid response time
Higher system throughput
Many tasks can be concurrently executed at different
computers
Distributed system can employ load distribution techniques
Tasks at heavily loaded systems are transferred to lightly
loaded computers
Waiting time of a task can be reduced
14
Advantages
Improved reliability and availability
Few components of the system can fail without affecting
the availability
System can be made fault tolerant through replication of
data and services
Data can be files and directories and services can be the
processes that provide functionality
Modular expandability
New hardware and software can be easily added without
replacing the existing system
15
Architecture types
DS can be classified into three broad categories
Minicomputer model
Workstation model
Processor pool model
16
Minicomputer Model
DS consists of several minicomputers
e.g. VAX processors
Each machine supports multiple users and share resources
Ratio between no. of processors to no. off users is usually less
than one
17
Workstation Model
Consists of several workstations ( up to several
thousands)
Each user has a workstation at his disposal, which
consist of powerful processor, memory and display
With the help of DFS, users can access data
regardless of its location
Ratio between no. of processors to no. of users is
usually 1
e.g. Athena and Andrew
18
Processor Pool Model
Ratio between processor to no. of users is normally
greater than 1
This model allocates one or more processors
according to users’ need
Once the processors complete their jobs, they return
to the pool and await a new assignment
Amoeba is a combination of the processor pool
model and workstation model
19
Characteristics of a Distributed
System
Following are the main characteristics of a DS
Resource Sharing
Openness
Concurrency
Scalability
Fault Tolerance
Transparency
20
Resource Sharing
Resource is a range of things that can be shared usefully in a
distributed system
Comprises of:
hardware components such as disks and printers
shared for convenience and to reduce costs
Software entities such as files, databases and applications
Software developers working as a team may need access to each other’s work
and share the same development tools
Requires a single copy of compiler, procedure libraries, editors and debugging
aids
Many applications enable users to access shared data objects in a single active
database
21
Resource Sharing
Resource manager is a software module that manages a set of
resources of same type
Each type of resource requires separate management policies ad
methods
E.g. provision of a naming scheme, mapping of names to
communication addresses and the coordination of concurrent accesses
Users communicate with the resource managers to access the shared
resources
Two common approaches are Client/Server and Object based
22
Resource Sharing
Client/Server Model
Currently the best known and most widely-adopted system model for distributed systems
Consists of a set of server processes and collection of client processes
Server processes act as resource manager for a collection of resources of a given type
Clients perform tasks that require access to shared resources
Resource managers may also need to access shared resources managed by another process
Shared resources are managed by server processes
Client processes issue requests to servers whenever they need to access one of their resources
Client/Server model is used to provide services such as, email, news messages, files,
synchronized clocks, disk storage, printers
Not possible to manage every resource in a distributed system in this way
23
Resource Sharing
Object-based Model
Each shared resource is viewed as an object which are uniquely identified
Can be moved anywhere in the network without changing their identities
Whenever a resource-using program requires access to a resource it sends a
message containing a request to the corresponding object
Message is dispatched to the appropriate procedure which performs the
requested operation and sends a reply message to the requesting process
Objects can act both as resource users and resource managers
Object manager is the collection of procedures and data values that together
characterize a class of objects
24
Openness
Characteristic which determines whether the system can be extended
in various ways
System can be open or close with respect to hardware or software
extensions
Open systems have their key interfaces published
Provide uniform inter-process communication mechanism and
Open distributed systems can be constructed from heterogeneous
hardware and software, possibly from different vendors
25
Concurrency
When several processes exist in a single computer, they are said to be
concurrent
In distributed systems there are many computers, each with one or
more central processors
For M computers, there may be up to M processes running in parallel
Many users simultaneously invoke commands or interact with application
programs
Many server processes run concurrently, each responding to different
requests from client processes
Concurrent accesses and updates to shared resources must be
synchronized
26
Scalability
Distributed systems operate effectively and efficiently at many different
scales
E.g. smallest DS consists of two workstations and a file server,
Whereas a DS constructed around a single local-area network may contain
several hundred workstations and many file servers, print servers and other
special purpose servers
The system and application software should not need to change when the
scale of the system increases
Some techniques to provide scalability are the use of replicated data, the
associated technique of caching and the deployment of multiple servers
to handle commonly performed tasks enabling several similar tasks to be
performed concurrently
27
Fault Tolerance
Computer systems sometimes fail
Server in a distributed system may fail
Network link may go down
When faults occur in hardware or software, programs may produce
incorrect results, or they may stop before they have completed
Design of fault tolerant systems is based on two approaches
Hardware redundancy: the use of redundant components
Software recovery: the design of programs to recover from faults
28
Transparency
Defined as the concealment from the user and the application
programmer of the separation of components in a distributed system
Transparency in a distributed system can be of different types:
Access
Location
Concurrency
Replication
Migration
Failure
Performance
29
Transparency
Transparency Description
Hide differences in data representation and how a resource is
Access
accessed
Location Hide where a resource is located
Migration Hide that a resource may move to another location
Relocation Hide that a resource may be moved to another location while in use
Replication Hide that a resource may be shared by several competitive users
Concurrency Hide that a resource may be shared by several competitive users
Failure Hide the failure and recovery of a resource
Persistence Hide whether a (software) resource is in memory or on disk
30
Distributed Operating System
Appears to users as a centralized OS for a single machine
Runs on multiple independent computers
An identical copy or different OS providing the same services may run
on every computer
Key concept is transparency
Users views the system as a virtual uniprocessor and not as a
collection of distinct machines
Eg.
Users simply submit jobs to the DOS through a computer
DOS performs distributed execution of jobs
Users don’t know on which computer job was executed
31
Issues in Distributed Operating
System
Global Knowledge
In case of shared memory systems ,up-to date state of all
processes and resources of the system is completely known
Whereas in distributed system it is much complex
Up-to date state of all processes and resources can not be known
because of absence of shared memory and clock and unexpected
delays
Fundamental problems in the design of DOS is to determine
efficient technique to implement decentralized system wide
control
Another problem is to how to order all the events that occur on
different times at different computers in the absence of global
clock
32
Naming
Names are used to refer to objects
Computers, printers, services, files and users
Eg. Name service maps a logical name into a physical
address, by using table lookup or by algorithm
If an algorithm is used for mapping, the algorithm would
depend upon the structure of the names
Another issues in naming is the method of naming
objects such that an object can be located irrespective of
its logical name
33
Scalability
Systems generally grow with time
Design should be such that system should not result in system unavailability
or degraded performance when growth occurs
e.g. broadcast based protocols work well for small systems but not for large
systems
Distributed File System
34
Compatibility
Refers to the interoperability among the resources in a
system
There are three levels of compatibility in DS
Binary Level: all processes execute the same instruction set even
though the processors may differ in performance and in input-
output
Eg. Emerald distributed system
Program development is easy
DS cannot include computers with different architectures
Rarely supported in large distributed systems
35
Compatibility
Execution level: if the same source code can be compiled and executed
properly on any computer in the system
E.g. Andrew and Athena systems support execution level compatibility
Protocol level: least restrictive form of compatibility
Requires all system components to support a common set of protocols
Individual computers can run different operating systems
Distributed system supporting protocol level compatibility employs common
protocols for essential system services such as file system
36
Process Synchronization
Process synchronization is difficult because of unavailability of shared
memory
DOS has to synchronize process running at different computers when
they try to concurrently access shared resources
Mutual exclusion problem
Request must be serialized to secure the integrity of the shared resources
In DS, process can request resources (local or remote) and release
resources in any order
If the sequence of the resource allocation is not controlled, deadlock may
occur which can lead to decrease in system performance
37
Resource Management
Concerned with making both local and remote resources available to
users in an effective manner
Users should be able to access remote resources as easily as they can
access local resources
Specific location of resources should be hidden from users in the
following ways:
Data Migration
Computation Migration and
Distributed scheduling
38
Data Migration
Data can either be file or contents of physical memory
In process of data migration, data is brought to the location of the computation that
needs access to it by the DOS
If computation updates a set of data, original location may have to be updated
In case of file DFS is involved
DFS is a component of DOS that implements a common file system available to the
autonomous computers in the system
Primary goal is to provide same functional capability to access files regardless of
their location
If the data accessed is in the physical memory of another system, then a
computation’s data request is handled by distributed shared memory
It provides a virtual address space that is shared among all the computers in a DS,
main issues are consistency and delays
39
Computation migration
In computation migration, computation migrates to another location
It may be efficient when information is needed concerning a remote
file directory
it is more efficient to send the message and receive the information
back, instead of transferring the whole directory
Remote procedural call has been commonly used for computation
migration
Only a part of computation of a process is normally carried out on a
different machine
40
Distributed Scheduling
Processes can be transferred from one computer to another by the
DOS
A process may be executed at a computer different from where it
was originated
Required when the computer is overloaded or does not have the
necessary resources
Distributed scheduling is responsible for judiciously and
transparently distributing processes amongst computers such that
overall performance is maximized
41
Security
OS is responsible for the security of the computer system
Two issues must be considered:
Authentication: process of guaranteeing that an entity is what it claims
to be
Authorization: process of deciding what privileges an entity has and
making only these privileges available