Distributed systems
Download
Report
Transcript Distributed systems
Advanced
Operating Systems
Lecture 8: Distributed Systems
University of Tehran
Dept. of EE and Computer Engineering
By:
Dr. Nasser Yazdani
Univ. of Tehran
Distributed Operating Systems
1
Covered topic
Distributed Systems, Why? And how.
References
Chapter 1 of the text book
Univ. of Tehran
Distributed Operating Systems
2
Outline
Why Distributed systems
Challenges.
Communication
Distributed Operating systems
Architectural models
Univ. of Tehran
Distributed Operating Systems
3
Problems?
Bigger Problems like weather forecast,
Economic modeling, Scientific problems, etc.
Faster machines? It is getting harder to extract the
performance modern applications require out of a single
processor machine
Some application are inherently distributed,
sensor networks, etc.
A lot of Data to store in one place
More efficient use of resources, sharing
resources
Solution: Distributed computing
Univ. of Tehran
Distributed Operating Systems
4
Distributed systems
Definitions
A collection of autonomous computers linked by a network,
with software designed to produce an integrated computing
facility
A distributed system is a collection of independent
computers that appear to users as a single computer
A system in which hardware or software components located
at networked computers communicate and coordinate their
actions only by passing messages
Examples
World Wide Web
Automatic Teller Machines
Cell Phones
Univ. of Tehran
Distributed Operating Systems
5
Working Definition
A distributed system is several computers
doing something together
Three primary features of a distributed
system
Multiple computers
Communications
“Virtual” Computer
Univ. of Tehran
Distributed Operating Systems
6
Advantages
Item
Economics
Speed
Description
Microprocessors offer a better
price/performance than mainframes
A distributed system may have more
total computing power than a mainframe
Inherent
Distribution
Reliability
Some applications involve spatially
separated machines.
If one machine crashes, the system as a
whole can still survive
Incremental
Growth
Computing power can be added in small
increments
Univ. of Tehran
Distributed Operating Systems
7
Disadvantages
Item
Description
Software
Little software, OSs or PLS, exists
at present for distributed systems
Networking
The network can saturate or cause
other problems.
Easy access also applies to secret
data, privacy!
Security
Univ. of Tehran
Distributed Operating Systems
8
Consequences
Concurrency
No Global Clock
Concurrency is the norm instead of the exception
Synchronization is critical
There is a limit as to how accurate a global clock can
be.
Independent Failures
The more stuff you add the more likely something
will break
Single system view says independent failures should
not affect users
Univ. of Tehran
Distributed Operating Systems
9
Communication Issues
Building a system out of interconnected
computers requires that some major
issues be addressed
Independent failure
Unreliable communication
Insecure Communication
Costly Communication
Univ. of Tehran
Distributed Operating Systems
10
Distributed Operating
Systems
A distributed operating system supports the
encapsulation and protection of resources
inside servers; and it supports mechanisms
required to access these resources, including
naming, communication and scheduling
The software for multiple CPU systems can be
divided into three rough classes
Network operating systems (file servers)
Distributed Operating Systems
Shared Memory Multiprocessors
Univ. of Tehran
Distributed Operating Systems
11
Parallel Computing
A large collection of processing elements
that can communicate and cooperate to
solve large problems quickly
A form of information processing which
uses concurrent events during execution
In other words, both the language and the
hardware support concurrency
Univ. of Tehran
Distributed Operating Systems
12
Parallel Architectures
Unlike traditional von Neumann
machines, there is no single standard
architecture used on parallel machines
In fact dozens of different parallel
architectures have been built and are being
used
Several people have tried to classify the
different types of parallel machines
The taxonomy proposed by Flynn is the most
commonly used
Univ. of Tehran
Distributed Operating Systems
13
Challenges
There are a number of challenges found in
building distributed systems
Heterogeneity
Openness
Security
Scalability
Failure Handling
Concurrency
Transparency
Univ. of Tehran
Distributed Operating Systems
14
Heterogeneity
Applies to
Networks
Computer Hardware
Operating Systems
Programming Languages
Implementations
Middleware applies to a software layer
that helps to handle heterogeneity
Univ. of Tehran
Distributed Operating Systems
15
Openness
The characteristic that a system can be
extended in various ways
Hardware extensions
Software extensions
Historically, computer systems were
largely closed
UNIX broke the mold for OS
IBM PC broke the mold for hardware
Univ. of Tehran
Distributed Operating Systems
16
Security
Security is a huge issue in computing in
general, but even more so in distributed
computing
Communication
Distributed Resources
Infrastructure Attacks
Univ. of Tehran
Distributed Operating Systems
17
Scalability
Distributed systems operate at many
different scales
Two workstations and a file server
The CS computers…
Often the more important question is not
can you scale, but can you scale well
Consider the Internet
Univ. of Tehran
Distributed Operating Systems
18
Failure Handling
What happens when a fault occurs?
Detect
Mask
Tolerate
Fault tolerant design is based on two
approaches
Hardware redundancy
Software recovery
Univ. of Tehran
Distributed Operating Systems
19
Hardware Redundancy
Two computers are employed for a single
application, one acting as a standby
Very costly, but often very effective, solution
Redundancy can be planned at a finer
grain
Individual servers can be replicated
Redundant hardware can be used for noncritical activities when no faults are present
Univ. of Tehran
Distributed Operating Systems
20
Software Redundancy
Software must be designed so that the
state of permanent data can be recovered
or “rolled back” when a fault is detected
Transaction processing
Univ. of Tehran
Distributed Operating Systems
21
Concurrency
Concurrency in a distributed system does
not necessarily mean concurrency within
a single program
Many users invoke similar commands
Many different server processes may be
running
Synchronization, of course, is a problem
Univ. of Tehran
Distributed Operating Systems
22
Transparency
Transparency Description
Access
Hide differences in data representation and how a
resource is accessed
Location
Migration
Hide where a resource is located
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
Univ. of Tehran
Hide that a resource may move to another location
Distributed Operating Systems
23
Scalability Problems
Concept
Example
Centralized services
A single server for all users
Centralized data
A single on-line telephone book
Centralized algorithms
Doing routing based on complete information
Examples of scalability limitations.
Univ. of Tehran
Distributed Operating Systems
24
Scaling Techniques (1)
1.4
The difference between letting:
• a server or
• a client check forms as they are being filled
Univ. of Tehran
Distributed Operating Systems
25
Scaling Techniques (2)
1.5
An example of dividing the DNS name space into zones.
Univ. of Tehran
Distributed Operating Systems
26
Hardware Models
1.6
Different basic organizations and memories in distributed
computer systems
Univ. of Tehran
Distributed Operating Systems
27
Multiprocessors (1)
A bus-based multiprocessor.
1.7
Univ. of Tehran
Distributed Operating Systems
28
Multiprocessors (2)
a)
b)
A crossbar switch
An omega switching network
1.8
Univ. of Tehran
Distributed Operating Systems
29
Homogeneous
Multicomputer Systems
a)
b)
Grid
Hypercube
1-9
Univ. of Tehran
Distributed Operating Systems
30
Software Models
System
Description
Main Goal
DOS
Tightly-coupled operating system for multiprocessors and homogeneous multicomputers
Hide and manage
hardware resources
NOS
Loosely-coupled operating system for
heterogeneous multicomputers (LAN and
WAN)
Offer local services
to remote clients
Middleware
Additional layer atop of NOS implementing
general-purpose services
Provide distribution
transparency
An overview between
DOS (Distributed Operating Systems)
NOS (Network Operating Systems)
Middleware
Univ. of Tehran
Distributed Operating Systems
31
Uniprocessor Operating
Systems
Separating applications from operating system
code through a microkernel.
1.11
Univ. of Tehran
Distributed Operating Systems
32
Multicomputer Operating
Systems (1)
1.14
Univ. of Tehran
Distributed Operating Systems
33
Multicomputer Operating
Systems (2)
Alternatives for blocking and buffering in message
passing.
1.15
Univ. of Tehran
Distributed Operating Systems
34
Multicomputer Operating
Systems (3)
Synchronization point
Send buffer
Reliable comm.
guaranteed?
Block sender until buffer not full
Yes
Not necessary
Block sender until message sent
No
Not necessary
Block sender until message received
No
Necessary
Block sender until message delivered
No
Necessary
Relation between blocking, buffering, and reliable
communications.
Univ. of Tehran
Distributed Operating Systems
35
Distributed Shared Memory
Systems (1)
a)
b)
c)
Pages of address
space distributed
among four
machines
Situation after CPU
1 references page
10
Situation if page
10 is read only
and replication is
used
Univ. of Tehran
Distributed Operating Systems
36
Distributed Shared Memory
Systems (2)
False sharing of a page between two independent
processes.
1.18
Univ. of Tehran
Distributed Operating Systems
37
Network Operating
System (1)
General structure of a network operating system.
1-19
Univ. of Tehran
Distributed Operating Systems
38
Network Operating
System (2)
Two clients and a server in a network operating system.
1-20
Univ. of Tehran
Distributed Operating Systems
39
Network Operating
System (3)
Different clients may mount the servers in different
places.
1.21
Univ. of Tehran
Distributed Operating Systems
40
Positioning Middleware
General structure of a distributed system as middleware.
1-22
Univ. of Tehran
Distributed Operating Systems
41
Software Layers
Applications, services
Middleware
Operating system
Platform
Computer and network hardware
Univ. of Tehran
Distributed Operating Systems
42
Middleware
What does it do?
Provides an API for the application
Hides the underlying heterogeneity
Examples
Sun RPC, ISIS
CORBA
RMI
DCOM
Univ. of Tehran
Distributed Operating Systems
43
Middleware and Openness
1.23
In an open middleware-based distributed system, the
protocols used by each middleware layer should be the
same, as well as the interfaces they offer to applications.
Univ. of Tehran
Distributed Operating Systems
44
Comparison between
Systems
Distributed OS
Multiproc.
Multicomp.
Network Middleware
-based OS
OS
Degree of
transparency
Very High
High
Low
High
Same OS on all nodes
Yes
Yes
No
No
Number of copies of
OS
1
N
N
N
Basis for
communication
Shared
memory
Messages
Files
Model
specific
Resource
management
Global,
central
Global,
distributed
Per node
Per node
Scalability
No
Moderately
Yes
Varies
Openness
Closed
Closed
Open
Open
Item
Univ. of Tehran
Distributed Operating Systems
45
Architectural Models
Concerned with
The placement of the components across a
network of computers
The interrelationships between the
components
Common abstractions
Server processes
Client processes
Peer processes
Univ. of Tehran
Distributed Operating Systems
46
Clients and Servers
General interaction between a client and a server.
1.25
Univ. of Tehran
Distributed Operating Systems
47
Processing Level
The general organization of an Internet
search engine into three different layers
1-28
Univ. of Tehran
Distributed Operating Systems
48
Multitiered Architectures
(1)
Alternative client-server organizations (a) – (e).
1-29
Univ. of Tehran
Distributed Operating Systems
49
Multitiered Architectures
(2)
An example of a server acting as a client.
1-30
Univ. of Tehran
Distributed Operating Systems
50
Client-Server
•Creating for example a hotmail? What are the options?
•One server?
•Several servers?
Client
invocation
res ult
invocation
Server
Server
res ult
Client
Key:
Process :
Univ. of Tehran
Distributed Operating Systems
Computer:
51
Multiple Servers
Service
Server
Client
Server
Client
Server
Univ. of Tehran
Distributed Operating Systems
52
Proxy Server
Web
server
Client
Proxy
server
Web
server
Client
Univ. of Tehran
Distributed Operating Systems
53
Peer Processes
Application
Application
Coordination
code
Coordination
code
Application
Coordination
code
Univ. of Tehran
Distributed Operating Systems
54
Modern Architectures
An example of horizontal distribution of a Web service.
1-31
Univ. of Tehran
Distributed Operating Systems
55
Next Lecture
Communication among distributed
systems.
Remote Procedure Call (RPC)
References
Chapter 2 of the book
Univ. of Tehran
Distributed Operating Systems
56