Chapter 1 (A) - Distribted System
Chapter 1 (A) - Distribted System
2
Definition of a Distributed System
a distributed system is:
a collection of independent computers that appears to its
users as a single coherent system - computer (Tanenbaum
& Van Steen)
3
Why Distributed?
Resource and Data Sharing
printers, databases, multimedia servers, ...
Availability, Reliability
the loss of some instances can be hidden
Scalability, Extensibility
the system grows with demand (e.g., extra servers)
Performance
huge power (CPU, memory, ...) available
Inherent distribution, communication
organizational distribution, e-mail, video
4
Problems of Distribution
Concurrency, Security
clients must not disturb each other
Privacy
e.g., when building a preference profile
unwanted communication such as spam
Partial failure
we often do not know where the error is (e.g., RPC)
Location, Migration, Replication
clients must be able to find their servers
Heterogeneity
hardware, platforms, languages, management
5
1.2 Organization and Goals of a Distributed System
to support heterogeneous computers and networks and to
provide a single-system view, a distributed system is
often organized by means of a layer of software called
middleware that extends over multiple machines
7
different forms of transparency in a distributed system
Transparency Description
Access Hide differences in data representation
(file naming, ...) and how a resource
is accessed
Location Hide where a resource is physically located;
where
is http://www.google.com? (naming)
Migration Hide that a resource may move to another
location
Relocation Hide that a resource may be moved to
another location while in use; e.g., mobile users
using their wireless laptops
Replication Hide that a resource is replicated
Concurrency Hide that a resource may be shared by
several competitive users; a resource must be left
in a consistent state
Failure Hide the failure and recovery of a resource 8
Openness in a Distributed System
A distributed system should be open
we need well-defined interfaces
Interoperability
components of different origin can communicate
Portability
components work on different platforms
Another goal of an open distributed system is that it
should be flexible and extensible;
easy to configure the system out of different components;
easy to add new components,
easy to replace existing ones
an Open Distributed System is a system that offers services
according to standard rules that describe the syntax and
semantics of those services; e.g., protocols in networks
9
Scalability in Distributed Systems
a distributed system should be scalable
Size: adding more users and resources to the system
Geographically: users and resources may be far apart
Administratively: should be easy to manage even if it
spans many administrative organizations
10
Scalability problems: performance problems caused by
limited capacity of servers and networks
Concept Example
Single server for all users-mostly for security
Centralized services
reasons
Centralized data A single on-line telephone book
Doing routing based on complete
Centralized algorithms
information
examples of scalability limitations
Scaling Techniques
how to solve scaling problems
For geographical scalability: the problem is mainly
performance, due to the limitations in the capacity of
servers and networks
three possible solutions: hiding communication latencies,
distribution, and replication
11
a. Hide Communication Latencies
Try to avoid waiting for responses to remote service
requests
let the requester do other useful job
i.e., construct requesting applications that use only
asynchronous communication instead of synchronous
communication; when a reply arrives the application is
interrupted
Good for batch processing and parallel applications but
not for interactive applications
for interactive applications, move part of the job to the
client to reduce communication; e.g. filling a form and
checking the entries
12
(a) a server checking the correctness of field entries
(b) a client doing the job
13
b. Distribution
e.g., DNS - Domain Name System
divide the name space into zones
for details, see later in Chapter 4 - Naming
15
1.3 Hardware and Software Concepts
Hardware Concepts
different classification schemes exist
multiprocessors - with shared memory
multicomputers - that do not share memory
can be homogeneous or heterogeneous
16
a single
backbone
17
Multiprocessors - Shared Memory
the shared memory has to be coherent –
the same value written by one processor must be read by another
processor
Performance problem for bus-based organization since the
bus will be overloaded as the number of processors
increases
The solution is to add a high-speed cache memory
between the processors and the bus to hold the most
recently accessed words; may result in incoherent memory
a bus-based multiprocessor
Bus-based multiprocessors are difficult to scale even with
caches
Two possible solutions: crossbar switch and omega
network 18
Crossbar switch
divide memory into modules and connect them to the
processors with a crossbar switch
at every intersection, a crosspoint switch is opened and
closed to establish connection
problem: expensive; with n CPUs and n memories, n2
switches are required
19
Omega network
use switches with multiple input and output lines
drawback: high latency because of several switching
stages between the CPU and memory
20
Homogeneous Multicomputer Systems
also referred to as System Area Networks (SANs)
the nodes are mounted on a big rack and connected
through a high-performance network
could be bus-based or switch-based
bus-based
shared multiaccess network such as Fast Ethernet can
be used and messages are broadcasted
Performance drops highly with more than 25-100 nodes
(contention)
21
switch-based
messages are routed through an interconnection network
two popular topologies: meshes (or grids) and
hypercubes
Hypercube
Grid
22
Heterogeneous Multi-Computer Systems (HMCS)
most distributed systems are built on heterogeneous
multicomputer systems
the computers could be different in processor type,
memory size, architecture, power, operating system, etc.
and
I/O bandwidth and the interconnection network may be
highly are different
the distributed system provides a software layer to hide the
heterogeneity at the hardware level; i.e., provides
transparency
23
Software Concepts
Distributed OS (DOS)
Network OS (NOS)
Middleware
24
Software Concepts…….
Operating systems for distributed computers can be
roughly divided into two categories:
Tightly-coupled systems:
The OS tries to maintain a single, global view of the resources
Generally, referred to as distributed OSs (DOS)
Used for multiprocessors and homogeneous multi-computers
Each component dependent on the others
Manages all the resources in a distributed system,
Provides transparency (location, migration, concurrency,
replication)
Loosely-coupled systems, referred to as network OSs
(NOS)
In which, there are a collection of computers each running their
own operating system;
However, these OS work together to make their services and
resources available to others
Used for heterogeneous multi-computers
25
Software Concepts……
Middleware:
To enhance the services of network operating
system (NOS)
To provide distribution transparency
To actually come to a distributed system
26
Summary of main issues
27
Distributed Operating Systems
Two types of Distributed systems
Multiprocessor operating system:
Manages the resources of a multiprocessor
Multicomputer operating system:
An operating system that is developed for
homogeneous multi-computers
28
Uniprocessor Operating Systems:
One large kernel that handles everything (e.g., MS-
DOS, early UNIX).
Microkernel architecture: The OS kernel is
decomposed into micro kernels,
Separating applications from operating system code
through a microkernel
29
More on Multiprocessor Operating Systems
Extended from uniprocessor operating systems to support
multiple processors having access to a shared memory
Problem: Consistency
Solution: using a protection mechanism (or two
synchronization mechanisms): semaphores and monitors
Semaphore: an integer with two atomic operations down
and up
Monitor: a programming language construct consisting
of procedures and variables that can be accessed only
by the procedures of the monitor;
only a single process at a time is allowed to execute a
procedure
30
Multicomputer Operating Systems
Processors can not share memory; instead communication
is through message passing
Each node has its own
kernel for managing local resources
separate module for handling interprocessor
communication
35
Middleware
A distributed operating system is not intended to handle a
collection of independent computers but provides
transparency and ease of use
A network operating system does not provide a view of a
single coherent system but is scalable and open
Combine the scalability and openness of network operating
systems and the transparency and ease of use of distributed
operating systems
this is achieved through a middleware, another layer of
software
36
general structure of a distributed system as middleware
37
a comparison between multiprocessor operating systems,
multicomputer operating systems, network operating
systems, and middleware-based distributed systems
Distributed OS
Network Middleware
Item
Multiproc Multicomp OS -based OS
Degree of
Very High High Low High
transparency
Same OS on all nodes Yes Yes No No
Number of copies of
1 N N N
OS
Basis for Shared Model
Messages Files
communication memory specific
Global, Global,
Resource management Per node Per node
central distributed
Scalability No Moderately Yes Varies
Openness Closed Closed Open Open
38
Examples of Distributed Systems
Networks
Started in 1070s
Ethernet and LAN were evented
The internet continue to be the biggest examples of distributed
systems.
Distributed systems have evolved from “LAN” based to “Internet” based.
Telecommunication networks
Real-time systems
Flight control systems
Uber and Ride
Manufacturing automation control systems
Parallel Processing
Distributed artificial intelligence
Distributed Database Systems
39
The end
40