CDS.01 Introduction
-
Upload
rahul-maravi -
Category
Documents
-
view
226 -
download
0
Transcript of CDS.01 Introduction
-
8/8/2019 CDS.01 Introduction
1/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
1
Concepts of Distributed Systems2006/2007
Introduction & overview
Johan Lukkien
-
8/8/2019 CDS.01 Introduction
2/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
2
Programme
Introduction & overview
Communication
Distributed OS & Processes
Synchronization
Security
Consistency & replication
Naming
Fault Tolerance
-
8/8/2019 CDS.01 Introduction
3/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
3
Introduction & overview
Distributed systems, why and what
Hardware concepts
Software Operating Systems
Middleware
Clients & Servers
-
8/8/2019 CDS.01 Introduction
4/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
4
Definition (van Steen)
Distributed system: A collection of independentcomputers that appears to its users as a single
coherent system.
-
8/8/2019 CDS.01 Introduction
5/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
5
Definition (Lukkien)
Distributed system: the hard- and software of acollection of independent computers thatcooperate
to realize some functionality usually, individual parts cannot realize that functionality justby themselves
may be: serving a user (...ultimately)
... but, user may not be involved directly
-
8/8/2019 CDS.01 Introduction
6/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
6
Independent
Concurrent
Independent failure
No shared clock No centralized control
(Spatial distribution)
-
8/8/2019 CDS.01 Introduction
7/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
7
Motivation: Share resources
connect resources & users compose applications from distributed functionality
Transparency hide internal details with respect to some property
Openness explicit boundaries
interfaces, protocols
policy vs. mechanism
Scalability size, location, administration
Performance
concurrency, centralized compute power
-
8/8/2019 CDS.01 Introduction
8/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
8
Transparency in a Distributed System
Transparency Description
AccessHide differences in data representation and how aresource is accessed
Location Hide where a resource is located
Migration Hide that a resource may move to another location
RelocationHide that a resource may be moved to another locationwhile in use
ReplicationHide that a resource may be shared by severalcompetitive users
ConcurrencyHide that a resource may be shared by several
competitive users
Failure Hide the failure and recovery of a resource
PersistenceHide whether a (software) resource is in memory or ondisk
-
8/8/2019 CDS.01 Introduction
9/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
9
Transparency
Not always a goal unawareness
.... can result in performance loss (e.g., caching)
.... can obstruct the use of lower-level information e.g. location, hardware properties
Not entirely possible never sure of receipt of last sent message fundamental limitation
cannot distinguish slow machine from failing one
-
8/8/2019 CDS.01 Introduction
10/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
10
Scalability principles
Requirement
Cost of increased complexity lower than benefit
Rules No machine needs/has complete information
Decisions are based on local information
Failure of one machine does not ruin results
No assumption of a global, shared clock
Techniques
Hide latency ... asynchrony
Replicate & relocate data, but also work
Distribute tasks locality principle
-
8/8/2019 CDS.01 Introduction
11/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
11
Scaling
Changing one or more particular system parameters....
typically one that relates to physical construction size, number of nodes, distance, ...
.... while keeping derived properties within specified bounds
typically, efficiency [= normalized performance]
related to a benchmark
Can extend this to scalable algorithms
e.g. a distributed matrix multiplication, investigating efficiency as afunction of number of processors or problem size
-
8/8/2019 CDS.01 Introduction
12/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
12
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
-
8/8/2019 CDS.01 Introduction
13/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
13
Scaling Techniques (1)
-
8/8/2019 CDS.01 Introduction
14/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
14
Scaling Techniques (2)
Dividing the DNS name space into zones.
-
8/8/2019 CDS.01 Introduction
15/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
15
Introduction & overview
Distributed systems, why and what
Hardware concepts
Software Operating Systems
Middleware
Clients & Servers
-
8/8/2019 CDS.01 Introduction
16/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
16
Hardware concepts
A network is modeled by a graph
Nodes: Processors, Memories, P+M
P+M may also be a dedicated network component
Network purpose:
connect P with M: tightly coupled
connect P+Ms: loosely coupled
P+M identical: homogeneous
Edges represent communication medium
broadcast, i.e. multiple access
e.g. bus, ethernet
point-to-point
e.g. switched ethernet
-
8/8/2019 CDS.01 Introduction
17/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
17
Broadcast medium
All access points see the same physical signals
...though not at the same time
introduces dependence on propagation delays
need to deal with collisions (in fact: interference) arbitration: centralized / distributed
back-off and try again....
Implementation: Several access points on a single wire
e.g., bus, coax ethernet, wireless LAN
Access points connected by repeaters & hubs
hub: repeat and amplify signal (as well as noise) on all lines, exceptwhere it came from
layer 1 switch, e.g. for ethernet
repeater: two-party hub (copy signal from one onto other)
The above two are functionally identical
-
8/8/2019 CDS.01 Introduction
18/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
18
10Base2 ethernet
No arbitration: detect and avoid collision CSMA/CD
10Base2: 10 Mbps, 200meter, coax
Loosely coupled
-
8/8/2019 CDS.01 Introduction
19/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
19
A bus-based multiprocessor
Arbitration, centralized (bus master)
-
8/8/2019 CDS.01 Introduction
20/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
20
Bus and switch
-
8/8/2019 CDS.01 Introduction
21/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
21
Switch implementations
Crosspint (crossbar) & multistage crossover
multistage crossover: n/2 log n
-
8/8/2019 CDS.01 Introduction
22/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
22
Homogeneous p2p: Grid and Hypercube
-
8/8/2019 CDS.01 Introduction
23/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
23
Broadcasting & scaling
Networks based on broadcasting are limited in size(geographical, number of nodes)
Collision domain: the domain in which physical broadcasting is
done (derived from collision-based methods)
Communication based on packets for
scaling in network size
decoupling
-
8/8/2019 CDS.01 Introduction
24/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
24
Current networks: heterogeneous
Connect multi-computers, PCs, palm-tops
using a variety of physical connections
Just connect arbitrary networks
e.g. wire-less and regular LAN, bluetooth
Generally, physical connections do not connect all pairs directly
some nodes need to transport information explicitly
these nodes need to interpret the passed information to some
extent
....need hiding of these details (transparency)
-
8/8/2019 CDS.01 Introduction
25/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
25
Introduction & overview
Distributed systems, why and what
Hardware concepts
Software Operating Systems
Middleware
Clients & Servers
-
8/8/2019 CDS.01 Introduction
26/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
26
Software Concepts
System Description Main Goal
DOSTightly-coupled operating system for multi-
processors and homogeneous multicomputers
Hide and manage
hardware resources
NOSLoosely-coupled operating system forheterogeneous multicomputers (LAN and WAN)
Offer local servicesto remote clients
MiddlewareAdditional layer on top of NOS implementinggeneral-purpose services
Provide distributiontransparency
DOS: Distributed Operating Systems
NOS: Network Operating Systems
-
8/8/2019 CDS.01 Introduction
27/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
27
Uniprocessor Operating Systems
Provide virtual machine to user: transparent
multi-tasking, multi-user, communication & synchronization primitives, i/o, ....
OS-support for shared-memory concurrency: synchronization primitives
shared variables, semaphores, monitors
.... however, no real concurrency, hence simple implementations
Architecture: monolithic or microkernel
Micro-kernel as a software architecture:
separates a minimal functional core from
extended functionality and
customer-specific parts
and serves as a socket for plugging-in these extensions and coordinate theircollaboration
(from Pattern-oriented software architecture, Buschmann et.al.)
-
8/8/2019 CDS.01 Introduction
28/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
28
Micro-kernel OS
Application Application
Driver
Filesystem
Driver
Memory manager
Scheduler
Hardware
Process management
(micro)kernel
user
user
kernel
Drivers, filesystem, IO and many other typical OS tasks gooutside the kernel as externalor internalservices
easy to change (hot pluggable) or to remove
standardmemory
protection:
no system
crash in case
of error
-
8/8/2019 CDS.01 Introduction
29/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
29
Micro-kernel (cntd)
Performance penalty: all communication through kernel
Typical communication facility between system components:message passing
natural view on distribution
-
8/8/2019 CDS.01 Introduction
30/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
30
Extend the virtual machine to multipleprocessors
Shared memory models:
UMA, (cc)NUMA
OS-support for shared-memory concurrency: synchronizationprimitives
shared variables, semaphores, monitors
now: implementations must deal with real concurrency
Question: what about scalability?
-
8/8/2019 CDS.01 Introduction
31/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
31
Distributed Operating System
Multicomputer: distributed memory
message passing is the basic primitive
no simple global synchronization
Generally, OS kernel per machine
Symmetric: kernels are (almost) the same
System view: kernels know about each other
Services: transparently distributed
May emulate shared memory
but usually message passing is provided only
-
8/8/2019 CDS.01 Introduction
32/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
32
Distributed Operating System
-
8/8/2019 CDS.01 Introduction
33/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
33
Message passing synchronization
-
8/8/2019 CDS.01 Introduction
34/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
34
Network Operating System
Machines independent:
own OS
heterogeneous
Services: tied to individual machines
File oriented
-
8/8/2019 CDS.01 Introduction
35/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
35
Two clients and a server in a NOS
-
8/8/2019 CDS.01 Introduction
36/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
36
Middleware
OSs dont know each-other, can be entirely different
transparency, in particular w.r.t. heterogeneity
Still: distributed, general services needed
factor out common functionality
NOSs services too basic and too diverse
-
8/8/2019 CDS.01 Introduction
37/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
37
Middleware services
Communication
RPC, message oriented, ....
Information
database access, directory, naming, ...
Control
transaction processing, code migration
Security
authentication, encryption, ...
-
8/8/2019 CDS.01 Introduction
38/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
38
Middleware and Openness
Openness concerns both interface
protocol
-
8/8/2019 CDS.01 Introduction
39/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
39
Comparison between Systems
Distributed OSItem
Multiproc. Multicomp.
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 Sharedmemory
Messages Files Model specific
Resource managementGlobal,central
Global,distributed
Per node Per node
Scalability No Moderately Yes Varies
Openness Closed Closed Open Open
NetworkOS
Middleware-based OS
-
8/8/2019 CDS.01 Introduction
40/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
40
Introduction & overview
Distributed systems, why and what
Hardware concepts
Software Operating Systems
Middleware
Clients & Servers
-
8/8/2019 CDS.01 Introduction
41/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
41
Clients and Servers
Server: offers service
often: access to a shared resource
Client: uses service
Floating roles!
A li i l i
-
8/8/2019 CDS.01 Introduction
42/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
42
Application layering
M ltiti d A hit t
-
8/8/2019 CDS.01 Introduction
43/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
43
Multitiered Architectures
Network cuts possible at many places
even multiple cuts!
M ltiti d A hit t
-
8/8/2019 CDS.01 Introduction
44/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
44
Multitiered Architectures
Each task a separate machine
Server/client roles change
M d A hit t
-
8/8/2019 CDS.01 Introduction
45/45
6-Nov-06 Johan J. Lukkien, [email protected]/e Informatica, System Architecture and Networking
45
Modern Architectures
Distinguish horizontal and verticaldistribution
horizontal: distribute single layer
vertical: distribute layers