Distributed Systems
Distributed Systems
● I. IntroductionI. Introduction● II. Fundamental Concepts of Distributed SystemsII. Fundamental Concepts of Distributed Systems
– Architecture models; network architectures: OSI, Internet and LANs; Architecture models; network architectures: OSI, Internet and LANs; interprocess communication
interprocess communication
● III. Time and Global StatesIII. Time and Global States
– Clocks and concepts of time; Event ordering; Synchronization; Global Clocks and concepts of time; Event ordering; Synchronization; Global states
states
● IV. CoordinationIV. Coordination
– Distributed mutual exclusion; Multicast; Group communication, Byzantine Distributed mutual exclusion; Multicast; Group communication, Byzantine problems (consensus)
problems (consensus)
● V. Distribution and Operating SystemsV. Distribution and Operating Systems
– Protection mechanisms; Processes and threads; Networked OS; Distributed Protection mechanisms; Processes and threads; Networked OS; Distributed and Network File Systems (NFSs)
and Network File Systems (NFSs)
● VI. Peer to peer systemsVI. Peer to peer systems
– Routing in P2P, OceanStore, Bittorrent, OneSwarm, Ants P2P, Tor, Routing in P2P, OceanStore, Bittorrent, OneSwarm, Ants P2P, Tor, Freenet, I2P
Freenet, I2P
● VII. SecurityVII. Security
– Security concepts; Cryptographic algorithms; Digital signatures; Security concepts; Cryptographic algorithms; Digital signatures; Authentication; Secure Sockets
Distributed Systems
Distributed Systems
●
Definitions
Definitions
–
“
“
A system in which hardware or software components located
A system in which hardware or software components located
at
at networked computers
networked computers
communicate and coordinate their
communicate and coordinate their
actions only by
actions only by
message passing
message passing
.
.
” [Coulouris]
” [Coulouris]
–
“
“
A system that consists of a collection of two or more
A system that consists of a collection of two or more
independent
independent
computers which coordinate their processing
computers which coordinate their processing
through the exchange of synchronous or asynchronous
through the exchange of synchronous or asynchronous
message passing
message passing
.
.
”
”
–
“
“
A distributed system is a collection of
A distributed system is a collection of
independent
independent
computers
computers
that
that
appear to the users
appear to the users
of the system as a single computer.
of the system as a single computer.
”
”
[Tanenbaum]
[Tanenbaum]
–
“
“
A distributed system is a collection of
A distributed system is a collection of
autonomous
autonomous
computers
computers
linked by a network with software designed to produce an
linked by a network with software designed to produce an
integrated computing facility
Distributed Systems
Distributed Systems
●
Computer Networks vs. Distributed Systems
Computer Networks vs. Distributed Systems
–
Computer Network: the autonomous computers are explicitly
Computer Network: the autonomous computers are explicitly
visible (have to be explicitly addressed)
visible (have to be explicitly addressed)
–
Distributed System: existence of multiple autonomous
Distributed System: existence of multiple autonomous
computers is transparent
computers is transparent
–However,
However,
●
many problems in common,
many problems in common,
●
in some sense networks (or parts of them, e.g., name services)
in some sense networks (or parts of them, e.g., name services)
are also distributed systems, and
are also distributed systems, and
●
normally, every distributed system relies on services provided
normally, every distributed system relies on services provided
by a computer network.
by a computer network.
Distributed Systems
Distributed Systems
●
Reasons for distributing systems
Reasons for distributing systems
–
Functional
Functional
distribution: computers have different functional
distribution: computers have different functional
capabilities.
capabilities.
●
Client / server
Client / server
●Host / terminal
Host / terminal
●
Data gathering / data processing
Data gathering / data processing
->
->
sharing of resources
sharing of resources
with specific functionalities
with specific functionalities
–
Inherent distribution
Inherent distribution
stemming from the application domain,
stemming from the application domain,
e.g.
e.g.
●
cash register and inventory systems for supermarket chains
cash register and inventory systems for supermarket chains
●computer supported collaborative work
computer supported collaborative work
–
Load
Load
distribution / balancing: assign tasks to processors such
distribution / balancing: assign tasks to processors such
that the overall system performance is optimized.
Distributed Systems
Distributed Systems
●
Reasons for distributing systems
Reasons for distributing systems
–
Replication of
Replication of
processing power
processing power
: independent processors
: independent processors
working on the same task
working on the same task
●
distributed systems consisting of collections of microcomputers
distributed systems consisting of collections of microcomputers
may have processing powers that no supercomputer will ever
may have processing powers that no supercomputer will ever
achieve
achieve
– 10000 CPUs, each running at 50 MIPS, yields 500000 MIPS, 10000 CPUs, each running at 50 MIPS, yields 500000 MIPS,
● then instruction to be executed in 0.002 nsec then instruction to be executed in 0.002 nsec ● equivalent to light distance of 0.6 mm equivalent to light distance of 0.6 mm
● any processor chip of that size would melt immediatelyany processor chip of that size would melt immediately
–
Physical
Physical
seperation: systems that rely on the fact that
seperation: systems that rely on the fact that
computers are physically seperated (e.g., to satisfy reliability
computers are physically seperated (e.g., to satisfy reliability
requirements).
requirements).
–
Economics
Economics
: collections of microprocessors offer a better
: collections of microprocessors offer a better
price/performance ration than large mainframes
price/performance ration than large mainframes
Distributed Systems
Distributed Systems
●
Why Distributed Systems and not isolated hardware?
Why Distributed Systems and not isolated hardware?
–
Need to share data and resources amongst users
Need to share data and resources amongst users
–Enhance person-to-person communication
Enhance person-to-person communication
–
Flexibility: different computers with different capabilities can
Flexibility: different computers with different capabilities can
be shared amongst users
be shared amongst users
●
Problems with distributed, connected systems
Problems with distributed, connected systems
–
Software - how to design and manage it in a DS
Software - how to design and manage it in a DS
–
Dependency on the underlying network infrastructure (the
Dependency on the underlying network infrastructure (the
world wide wait…)
world wide wait…)
Distributed Systems
Distributed Systems
●
Consequences
Consequences
–
Distributed systems are
Distributed systems are
concurrent
concurrent
systems
systems
●
Every software or hardware component is autonomous
Every software or hardware component is autonomous
– In the sequel, we will call such an autonomous component a In the sequel, we will call such an autonomous component a “process”
“process”
● Difference process/programDifference process/program
●
Components execute concurrent tasks
Components execute concurrent tasks
– A and B are concurrent if either A can happen before B, or B can A and B are concurrent if either A can happen before B, or B can happen before A
happen before A
●
Synchronization and coordination by message passing
Synchronization and coordination by message passing
●Sharing of resources
Sharing of resources
●
Typical problems of concurrent systems
Typical problems of concurrent systems
– Deadlocks, LivelocksDeadlocks, Livelocks
– Unreliable communicationUnreliable communication
–
Absence of a
Absence of a
global clock
global clock
●
Due to asynchronous message passing there are limits on the
Due to asynchronous message passing there are limits on the
precision with which processes in a distributed system can
precision with which processes in a distributed system can
synchronize their clocks
Distributed Systems
Distributed Systems
●
Consequences (cont.)
Consequences (cont.)
–
Absence of a
Absence of a
global state
global state
●
In the general case, there is no single process in the distributed
In the general case, there is no single process in the distributed
system that would have a knowledge of the current global state
system that would have a knowledge of the current global state
of the system
of the system
– Due to concurrency and message passing communicationDue to concurrency and message passing communication
–
Specific
Specific
failure
failure
modes
modes
●
Processes run autonomously, in isolation
Processes run autonomously, in isolation
– Failures of individual processes may remain undetectedFailures of individual processes may remain undetected
– Individual processes may be unaware of failures in the system Individual processes may be unaware of failures in the system context
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
1. The Internet
1. The Internet
●
Heterogeneous network of computers and applications
Heterogeneous network of computers and applications
●Implemented through the Internet Protocol Stack
Implemented through the Internet Protocol Stack
●
Typical configuration:
Typical configuration:
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
2. Distributed Multimedia-Systems
2. Distributed Multimedia-Systems
●
Often use Internet infrastructure
Often use Internet infrastructure
●Characteristics
Characteristics
– Heterogeneous data sources and sinks that need to be synchronized Heterogeneous data sources and sinks that need to be synchronized in real time
in real time
● VideoVideo ● AudioAudio ● TextText
– Often: Distribution servicesOften: Distribution services
● MulticastMulticast
●
Examples
Examples
– Teleteaching tools (mbone-based, etc.)Teleteaching tools (mbone-based, etc.) – Video-conferencingVideo-conferencing
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
3. Intranets
3. Intranets
●
Locally administered network
Locally administered network
●
Usually proprietary (e.g., the University campus network)
Usually proprietary (e.g., the University campus network)
●Interfaces with the Internet
Interfaces with the Internet
– FirewallsFirewalls
●
Provides services internally and externally
Provides services internally and externally
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
4. Mobile and Ubiquitous Computing Systems
4. Mobile and Ubiquitous Computing Systems
●
Cellular phone systems (e.g., GSM, UMTS)
Cellular phone systems (e.g., GSM, UMTS)
– Resources being sharedResources being shared
● Radio frequenciesRadio frequencies
● Transmission times on one frequency (UMTS: multiplexing)Transmission times on one frequency (UMTS: multiplexing) ● The mobile on the moveThe mobile on the move
●
Laptop computers
Laptop computers
– Wireless LANs (faculty campus WLAN, "MoPo")Wireless LANs (faculty campus WLAN, "MoPo")
●
Handheld devices, PDAs etc.
Handheld devices, PDAs etc.
●Wearable devices
Wearable devices
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
5. Embedded systems
5. Embedded systems
●
The networked coffee mug
The networked coffee mug
●Avionics control systems
Avionics control systems
– Flight management systems in aircraftFlight management systems in aircraft
●
Automotive control systems
Automotive control systems
– Mercedes S-Class automobiles these days are equipped with 50+ Mercedes S-Class automobiles these days are equipped with 50+ autonomous embedded processors
autonomous embedded processors
– Connected through proprietary bus-like LANsConnected through proprietary bus-like LANs
●
Consumer Electronics
Consumer Electronics
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
6. Telephony systems
6. Telephony systems
●
Examples
Examples
– POTSPOTS – ISDNISDN
– Intelligent NetworksIntelligent Networks
– Advanced Intelligent NetworksAdvanced Intelligent Networks
●
Shared resources
Shared resources
– NetworkNetwork
– ManagementManagement – PhonesPhones
–
7. Network management
7. Network management
●
Administration of network resources
Administration of network resources
●State: resource and connection status
State: resource and connection status
●Example
Example
Distributed Systems
Distributed Systems
●
Examples of Distributed Systems
Examples of Distributed Systems
–
8. Network File Systems
8. Network File Systems
●
Architecture to access file systems across a network
Architecture to access file systems across a network
●Famous example
Famous example
– Network File System (NFS), originally developed by SUN Network File System (NFS), originally developed by SUN Microsystems for remote access support in a UNIX context
Microsystems for remote access support in a UNIX context
–
9. The World Wide Web
9. The World Wide Web
●
Open client-server architecture implemented on top of the
Open client-server architecture implemented on top of the
Internet
Internet
●
Shared resouces
Shared resouces
– Information, uniquely identified through a Uniform Resource Information, uniquely identified through a Uniform Resource Locator (URL)
Locator (URL)
Distributed Systems
Distributed Systems
●
Challenges in the design of Distributed Systems
Challenges in the design of Distributed Systems
–
1.
1.
Heterogeneity
Heterogeneity
of
of
– underlying network infrastructure,underlying network infrastructure,
– computer hard- and software (e.g., operating systems, compare computer hard- and software (e.g., operating systems, compare UNIX socket and Winsock calls),
UNIX socket and Winsock calls),
– programming languages (in particular, data representations).programming languages (in particular, data representations).
●
Some approaches
Some approaches
– Middleware (e.g., CORBA): transparency of network, hard- and Middleware (e.g., CORBA): transparency of network, hard- and software and programming language heterogeneity
software and programming language heterogeneity
– Mobile Code (e.g., JAVA): transparency from hard-, software and Mobile Code (e.g., JAVA): transparency from hard-, software and programming language heterogeneity through virtual machine
programming language heterogeneity through virtual machine
concept
Distributed Systems
Distributed Systems
●
Challenges in the design of Distributed Systems
Challenges in the design of Distributed Systems
–
2.
2.
Openness
Openness
●
Ensure extensibility and maintainability of systems
Ensure extensibility and maintainability of systems
– Adherence to standard interfacesAdherence to standard interfaces
–
3.
3.
Security
Security
●
Privacy
Privacy
●
Authentication
Authentication
●Availability
Availability
more about this later.
more about this later.
Distributed Systems
Distributed Systems
●
Challenges in the design of Distributed Systems
Challenges in the design of Distributed Systems
–
4.
4.
Scalabity
Scalabity
–
Does the system remain effective given expectable growth?
Does the system remain effective given expectable growth?
●
Physical resources
Physical resources
●
Control performance loss and performance bottlenecks
Control performance loss and performance bottlenecks
– www.amazon.com is more than one computerwww.amazon.com is more than one computer – hierarchical structures in name servinghierarchical structures in name serving
●
correct dimensioning of software resources
correct dimensioning of software resources
– IP addresses: from 32 to 128 bitsIP addresses: from 32 to 128 bits
© Pearson Education 2001
Computers in the Internet
Computers vs. Web Servers in the Internet
Total Sites Across All Domains
August 1995 - June 2009
Market Share for Top Servers Across All Domains
August 1995 - June 2009
Distributed Systems
Distributed Systems
●
Challenges in the design of Distributed Systems
Challenges in the design of Distributed Systems
–
5. Handling of
5. Handling of
failures
failures
●
Detection (may be impossible)
Detection (may be impossible)
●Masking
Masking
– retransmissionretransmission
– redundancy of data storageredundancy of data storage
●
Tolerance
Tolerance
– exception handling (e.g., timeouts when waiting for a web exception handling (e.g., timeouts when waiting for a web resource)
resource)
●
Redundancy
Redundancy
– redundant routes in networkredundant routes in network
– replication of name tables in multiple domain name serversreplication of name tables in multiple domain name servers
–
6.
6.
Concurrency
Concurrency
●
Consistent scheduling of concurrent threads (so that
Consistent scheduling of concurrent threads (so that
dependencies are preserved, e.g., in concurrent transactions)
dependencies are preserved, e.g., in concurrent transactions)
Distributed Systems
Distributed Systems
●
Challenges in the design of Distributed Systems
Challenges in the design of Distributed Systems
–
7.
7.
Transparency
Transparency
: concealing the heterogeneous and
: concealing the heterogeneous and
distributed nature of the system so that it appears to the user
distributed nature of the system so that it appears to the user
like one system.
like one system.
●
Transparency categories (according to ISO's Reference Model
Transparency categories (according to ISO's Reference Model
for ODP)
for ODP)
– AccessAccess: access local and remote resources using identical : access local and remote resources using identical operations
operations
● e.g., network mapped drive using Samba server, NFS mountse.g., network mapped drive using Samba server, NFS mounts
– LocationLocation: access without knowledge of location of a resource: access without knowledge of location of a resource
● e.g., URLs, email addresses e.g., URLs, email addresses
– ConcurrencyConcurrency: allow several processes to operate concurrently : allow several processes to operate concurrently using shared resources in a consistent fashion
using shared resources in a consistent fashion
– ReplicationReplication: use replicated resource as if there was just one : use replicated resource as if there was just one instance
Distributed Systems
Distributed Systems
●
Transparency categories (according to ISO's Reference
Transparency categories (according to ISO's Reference
Model for ODP) (cont.)
Model for ODP) (cont.)
●
Failure
Failure
: allow programs to complete their task despite
: allow programs to complete their task despite
failures
failures
– retransmit of email messages retransmit of email messages
●
Mobility
Mobility
: allow resources to move around
: allow resources to move around
– e.g., 700 phone number - URLs are not!e.g., 700 phone number - URLs are not!
●
Performance
Performance
: adaption of the system to varying load
: adaption of the system to varying load
situations without the user noticing it
situations without the user noticing it
●