October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

102
October 2005 Distributed systems: Intr oduction 1 Distributed Systems: Introduction

Transcript of October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

Page 1: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 1

Distributed Systems:

Introduction

Page 2: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 2

Overview of chapters

• Introduction – Ch 1: Characterization of distributed systems

– Ch 2: System models

• Coordination models and languages

• General services

• Distributed algorithms

• Shared data

• Building distributed services

Page 3: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 3

Introduction: Overview

• Definitions

• Examples• Resource sharing and the Web

• Types of concurrency

• Challenges

• Architectural models

• Fundamental Models

• Summary

Page 4: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 4

Definitions

Distributed system =– Hardware or software components,

– Network

– Communication, coordination by message passing.

• Consequences:– Concurrency

– No global clock

– Independent failures

• Motivation– Resource sharing

Page 5: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 5

Definitions (cont.)

Distributed algorithm =

– collection of cooperating algorithms

– using message passing

– examples:

• mutual exclusion: to prevent different processes to

use the same resource simultaneously

Page 6: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 6

Overview

• Definitions• Examples • Resource sharing and the Web• Types of concurrency• Challenges• Architectural models• Fundamental Models • Summary

Page 7: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 7

Examples

• Examples of distributed systems:

– Internet & intranets

– Distributed UNIX

– Mobile & ubiquitous computing

– Commercial applications

• History

Page 8: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 8

Example 1: Internet

intranet

ISP

desktop computer:

backbone

satellite link

server:

network link:

Page 9: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 9

Example 1: Internet (cont.)

= A vast interconnected collection of computer networks

– collection of intranets connected by backbones

• ISPs: connectivity + services

• Services: WWW, Email, file transfer

Page 10: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 10

Example 1: Intranets

the rest of

email server

Web server

Desktopcomputers

File server

router/firewall

print and other servers

other servers

print

Local areanetwork

email server

the Internet

LANLAN

LAN

Page 11: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 11

Example 1: Intranets (cont.)

= portion of internet– A collection of LAN’s connected through backbones– Connected to internet through routers+ Separate administration+ Local security policies

• Motivation– Internet applications: WWW, Email, file transfer– More resource sharing

• Sharing files, printers, databases, • Avoiding the installation of software through services over

the intranet (using “thin clients”)

• Firewall: filtering messages at router

Page 12: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 12

Example 2: Distributed Unix

• Origin: Bell labs, 1975• Interprocess communication: BSD UNIX• Distributed operating system =

Operating system of

– a collection of autonomous computers

– linked by computer network

– equipped with distributed software

– to ….. create for the users a single integrated computing facility

A technical

achievement !

Page 13: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 13

Example 2: Distributed Unix (cont)

• wide spread components (SUN license)– Remote Procedure Calling (RPC)– Network File System (NFS)– Network Information Service (NIS)

Page 14: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 14

Example 2: Distributed Unix (cont)

• Applied research– remove limitations of original UNIX

– improve scaling

• Result .. – new generation of distributed systems

– Examples: Mach, Amoeba, Andrew (file system), Kerberos (security)

openmodular

extensible

*

Page 15: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 15

Example 3: Mobile & ubiquitous computing

Laptop

Mobile

PrinterCamera

Internet

Host intranet Home intranetWAP

Wireless LAN

phone

gateway

Host site

Page 16: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 16

Example 3: Mobile & ubiquitous computing

• Miniaturization & wireless networking– Laptops– Handheld devices: Personal Data Assistent,

mobile phones, video/digital camera’s,…– Wearable computers: smart watches, smart

cards, …– Embedded devices: washing machines, cars,

hi-fi systems,…

=> Mobile computing:=> Ubiquitous computing

Page 17: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 17

• Mobile computing: moving computing devices in and out intranets

– Transparent access to home intranet– Access to local resources at remote site Location-aware computing

• Ubiquitous computing– Small computing devices everywhere– Communication between devices

Example 3: Mobile & ubiquitous computing

Page 18: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 18

Challenges– Discovery of resources– Automated reconfiguration of host intranet

and mobile device when entering or leaving– Cope with limited connectivity– Privacy and security to

• Users

• Visited environment

Example 3: Mobile & ubiquitous computing

Page 19: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 19

Example 4: Commercial applications

• E-commerce– On-line retail, home banking

• Airline reservation systems• Telecommunication

– Audio and video: real-time traffic

• Healthcare– Global access to patient information

• Manufacturing– Resource planning and control

• …

Page 20: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 20

Examples (cont)

• History– 1950s: programmers reserve computers– 1960s: batch processing on mainframes– 1970s: time sharing on mainframes and

minicomputers– 1980s: personal computers

• first: in isolation• later: integrated in networks distributed file systems

– 1990s: distributed systems• increased integration; • middleware

– 2000s: ??? ubiquitous computing

Page 21: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 21

Overview

• Definitions

• Examples• Resource sharing and the Web

• Types of Concurrency

• Challenges

• Architectural models

• Fundamental Models

• Summary

Page 22: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 22

Types of Concurrency

Interleaved computation (single processor)– Job = execution of one program– Concurrent job = cooperating subtasks/threads– interleaved execution– threads communicate via shared memory– a single clock

=> events can be ordered

Page 23: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 23

Parallel computing (Multiprocessor)– job = execution of one program– job = cooperating subtasks/threads– real concurrency– threads communicate via shared memory– a single clock

events can be ordered

• E.g. SIMD: Single Instruction/Multiple Data

Types of Concurrency

Page 24: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 24

Distributed computing:– job = execution of many procedures– Job = many cooperating tasks– a single process can have subtasks/threads– real concurrency– processes communicate via message passing – multiple clocks

=> only partial order for events

Types of Concurrency

Page 25: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 25

Types of ConcurrencyParallel versus Distributed

• “parallel” hardware:

– identical processors,

– regular interconnection structure

• small granularity of tasks

• frequent communication between tasks

• homogeneity: tasks perform

similar functions

• Clock synchronised

• “distributed” hardware:

– different types of processors and

– networks

• large granularity of tasks• less frequent communication between

tasks

• inhomogeneity: tasks perform

different functions• synchronized execution of tasks

Page 26: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 26

Comparison (cont.) Local concurrency versus Distributed

Fundamental realities: Co-located Distributed

Communication Fast Slow

Failures Full failure Independent failures Network can partition

Concurrent issues Only with multiple threads Inherited

Secure Yes No

*

Page 27: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 27

Overview

• Definitions

• Examples• Resource sharing and the Web

• Types of Concurrency

• Challenges

• Architectural models

• Fundamental Models

• Summary

Page 28: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 28

Challenges

• Heterogeneity

• Openness

• Security

• Scalability

• Failure handling

• Concurrency

• Transparency

Page 29: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 29

• Heterogeneity at many levels– Networks (ethernet, token ring, .. )

– Computer hardware

– Operating systems (different API to internet)

– Programming languages

– Implementations by different developer (data structures)

• Solutions … middleware– Java RMI

– CORBA

– Implement uniform high level API

Challenges: Heterogeneity

Remote procedures

Remote method invocation

Remote event notification

Distributed transactions

Page 30: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 30

Challenges: Openness• Open systems

– enables adding system extensions without disruption or

duplication of existing services

• How?– Uniform communication mechanism

• to enable distributed programming

– Published and standard interfaces• to access shared resources

• Result– open distributed systems– heterogeneous hardware possible

Page 31: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 31

Challenges: Security

• Attacks against – Confidentiality/privacy– Integrity of messages– Authentication of user: simulating false

identity– Availability : unauthorized use of resources

• Accessing files, printers, …• Denial of service: blocking server by overwhelming

it with requests • Mobile code performing unauthorized operations

Page 32: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 32

Challenges: Scalability

• major challenge!

– Control cost of physical resources ( cost < O(n), n number of users)

– Control performance loss ( loss < O(log n), n size of data)

– Prevent software resources running out (e.g. IP addresses)

– Avoid performance bottlenecks

• general techniques:– Replication & partitioning of data,

– Caching of data

– multiple servers

allow scaling up the system

while keeping the same software

Page 33: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 33

Challenges: Scalability

• Computers vs. Web servers in the Internet

Date Computers Web servers Percentage

1993, July 1,776,000 130 0.008

1995, July 6,642,000 23,500 0.4

1997, July 19,540,000 1,203,096 6

1999, July 56,218,000 6,598,697 122001, July 125,888,197 31,299,592 25

42,298,3712003, July

Page 34: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 34

Challenges: Failure handling

• Partial failures Difficult to handle

• Techniques used:– Detecting failures (e.g. checksums)

– Masking failures (e.g. message retransmission)

– Tolerating failures (e.g. browser announces server not available)

– Recovery from failures (e.g. save & restore state) – Redundancy: replicating services

Page 35: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 35

Challenges: Concurrency

• The problem:– different clients simultaneous accessing a

shared resource

• Solutions – limit the number of users to 1

• (inefficient and restrictive)

– allow concurrent executions • non-trivial• Synchronization tools are needed

– Known techniques e.g. semaphores

Page 36: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 36

Challenges: Transparency

• A system is transparent for a feature if the feature is unobservable for the user

• Examples: – rlogin : local versus remote computer

– Java RMI: local versus remote object• Message to local or remote object is the same

– GSM: location is transparent

• Increase of uniformity!

Page 37: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 37

Challenges: Transparency

• Access: identical access to local and remote resources

• Location: access to resources without knowledge of their physical/network location

• Concurrency• Replication• Failure• Mobility: allows movement of resources

• Performance• Scaling

Page 38: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 38

Overview

• Definitions• Examples• Resource sharing and the Web• Types of Concurrency• Challenges• Architectural models• Fundamental Models • Summary

Page 39: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 39

Architectural Models

• A model of a system= certain aspect of a system

= abstract view on a system making abstraction

of all properties not related to the selected aspect

Page 40: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 40

Architectural models

• Focus on organization and interaction of the distributed system:– Different component objects/processes– their way of communication

• Architecture has major impact on quality of system– Architecture determines to great deal whether

the system will meet present and expected future demands.

Page 41: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 41

Architectural models

• Architecture: structure in terms of separately specified components

• Overall goal: structure will meet present and likely future demands

• Major concerns: make system– Reliable– Manageable– Adaptable– Cost-effective

Page 42: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 42

Architectural models

• Architectural model– Simplifies & abstracts functions of components– Placement of components– Interrelationships between components

• Overview– Software layers– System architectures– Design requirements

Page 43: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 43

Architectural models:Software layers

Applications, services

Computer and network hardware

Platform

Operating system

Middleware

Page 44: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 44

Architectural models:Software layers

• Platform– Various implementations– Provides communication & cooperation

between processes

• Middleware

Page 45: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 45

Architectural models:Software layers

• Middleware– Purpose

• Mask heterogeneity

• Provide convenient programming model

– Raises level of communication activities• Remote method invocation: RMI, CORBA, DCOM

• Group communication

• Notification of events

• Partitioning, replication of shared data

– Provides infrastructural services• Naming, transactions, persistent storage

Page 46: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 46

Architectural models:Software layers

• Middleware: limitations

end-to-end argument

– Some aspects require support at application level

Page 47: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 47

Architectural models

• Architectural model– Simplifies & abstracts functions of components– Placement of components– Interrelationships between components

• Overview– Software layers– System architectures– Design requirements

Page 48: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 48

Architectural models:System architectures

• Overview– Client-server: different roles

• n-Tier Architectures

• Multiple servers

• Proxy servers and caches

• Mobile code

– Peer-to-peer: cooperation as peers

Page 49: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 49

Architectural models:System architectures

• Client-server model– defines roles for 2 interacting entities– client:

• needs a particular service• sends request to server• gets (after some time) reply

– server:• awaits requests from clients• performs requested function

– server can be client of another server

Page 50: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 50

Architectural models:System architectures

• Client-server model

Server

Client

Client

invocation

result

Serverinvocation

result

Process:Key:

Computer:

Page 51: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 51

Architectural models:System architectures

• One-tier application architecture:

Presentation

Processing

Data

mainframe

Terminals, or

PC + terminal emulation

Net

wor

k

Page 52: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 52

Architectural models:System architectures

• Two-Tier Architecture– 2 entities used in the distributed application:

• at the user desktop:

user interface + %(application)

• at the database server:

%(application) + database

– thin <> fat client

• thin: no application code at desktop, only GUI

• fat: all application code at desktop

Page 53: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 53

Architectural models:System architectures

• Two-Tier Architecture: thin client

Presentation

Processing

Data

mainframe

Net

wor

kPC

Page 54: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 54

Architectural models:System architectures

• Two-Tier Architecture: fat client

Presentation

Processing

Data

mainframe

Net

wor

kPC

Page 55: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 55

Architectural models:System architectures

• Two-Tier Architecture: issues– update of code at clients: hard (many different

systems) thin clients

– application code executed at mainframe: performance bottleneck

fat clients

Page 56: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 56

Architectural models:System architectures

• Multi-Tier Architecture– 3 entities used in the distributed application:

• at the user desktop:

user interface

• at the application server

application logic

• at the database server:

data

Page 57: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 57

Architectural models:System architectures

• Multi-Tier Architecture:

Data

mainframe

Net

wor

k Presentation

Processing

PC

Application server

Page 58: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 58

Architectural models:System architectures

• Multi-Tier Architecture: issues– opportunities for

• better performance

• more flexibility

– interactions between 3 parties• more cooperation overhead

• need for transactions?

Page 59: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 59

Architectural models:System architectures

• Services provided by multiple servers

Server

Server

Server

Service

Client

Client

Page 60: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 60

Architectural models:System architectures

• Services provided by multiple servers– Partition objects

• Examples: DNS, WWW

– Replicated copies of objects• Examples: Sun NIS

• Increases performance & availability

• Improves fault tolerance

Page 61: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 61

Architectural models:System architectures

• Proxy servers and caches

Client

Proxy

Web

server

Web

server

serverClient

+ Reduce load on network & web servers

- Consistency!

Page 62: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 62

Architectural models:System architectures

• Mobile code– Good interactive response– Potential security threat

a) client request results in the downloading of applet code

Web server

ClientWeb serverApplet

Applet code

Client

b) client interacts with the applet

Page 63: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 63

Architectural models:System architectures

• Mobile agents= Running program (code + data)+ Travels from computer to computer→ Local access to data→ Potential security threat

Page 64: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 64

Architectural models:System architectures

• Client-server model + variations– Simple approach to sharing

– Centralization of service provision & management

→ Poor scaling

• Observations– Functionality

today’s desktop >> yesterday’s servers

– Always-on broadband connections

→ Peer-to-peer

Page 65: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 65

Architectural models:System architectures

• Peer processes

Application

Application

Application

Peer 1

Peer 2

Peer 3

Peers 5 .... N

Sharableobjects

Application

Peer 4

Page 66: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 66

Architectural models:System architectures

• Peer-to-peer– Exploit resources in a large number of participating

computers

– Shared objects distributed over participants

– Replication to distribute load & to provide resilience

→ More complex architecture

– Examples: • Antecedents: DNS, Netnews/Usenet, Grapevine name

registration

• Napster, Ivy file system

Page 67: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 67

Architectural models

• Architectural model– Simplifies & abstracts functions of components– Placement of components– Interrelationships between components

• Overview– Software layers– System architectures– Design requirements

Page 68: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 68

Architectural models: Design requirements

• Minimal requirement: – maintain functionality of a non-distributed system

• added value:– extended resource access– extended application interface for explicit sharing, fault tolerance,

etc.– advanced end user applications: CSCW (computer supported

cooperative work)

• QoS …– Reliability– Security– Performance– Adaptability

Page 69: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 69

User RequirementsQuality of service

• Reliability and availability– reliability = measure of the likelihood of the

system to deviate from the designed behaviour– increased by enabling failure detection and

recovery– highly reliable services often worse

response– fault tolerant system: detects failures and either

• fails gracefully (predictably)• masks the fault

Page 70: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 70

User RequirementsQuality of service

• Security: new problems– privacy and integrity of users data in network

packets• by tampering the network cable

• by connecting a machine to read and/or inject data packets

– openness to interface with system software• not all machines are physically secure

• e.g. a bogus file server could be created

Page 71: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 71

User RequirementsQuality of service

• Performance– Responsiveness– Throughput

• Processing speed at clients & servers + data transfer rate

– Balancing computational load

Page 72: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 72

Overview

• Definitions• Examples• Resource sharing and the Web• Comparison: distributed versus ...• Challenges• Architectural models• Fundamental Models • Summary

Page 73: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 73

Fundamental models

• System model gives answers to– What are the main entities in the system?– How do they interact?– What are characteristics that affect individual

& collective behavior?

• Purpose of model:– Make explicit all relevant assumptions– Make generalizations concerning what is

possible or impossible

Page 74: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 74

Fundamental models

• Aspects captured in our models:– Interaction: time aspects– Failure– Security

Page 75: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 75

Fundamental models:Interaction model

• Time is important– E.g. multimedia application requires timeliness– E.g. Event ordering problem in email Inbox

Item From Subject

23 Z Re:Meeting

24 X Meeting

25 Y Re:Meeting

Page 76: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 76

Fundamental models:Interaction model

• How to avoid the email ordering problem? – No problem if clock synchronization

– Clock synchronization is sometimes impossible

Page 77: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 77

Fundamental models:Interaction model

• No global notion of time

• Synchronisation of time impossible due to: – Performance variations:

• Latency (time between start of sending and end of receiving)

• Bandwidth

• Processing time for messages

– Computers have different clock drift rates

Synchronous model

Asynchronous model

Page 78: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 78

Fundamental models:Interaction model

• Synchronous distributed systems– Upper & lower bounds for

• Time to execute processing step

• Message transmission

• Clock drift rate

– Allow• Use of timeouts to detect process failure

• Guarantee of timeliness (multimedia)

• Partial clock synchronisation

Page 79: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 79

Fundamental models:Interaction model

• Asynchronous distributed systems– No time bounds – Many systems are asynchronous

• E.g. Internet• Due to sharing of processors & communication

channels • Often offer the best performance (because no

resources are wasted)

– Consequences:• Clock synchronization impossible• No guarantee of timeliness possible

Page 80: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 80

Fundamental models:Interaction model

• Solution to ordering problem– With (perfect) clock synchronization

no problem

– In asynchronous model• Facts:

– Ordering possible within a single process– Send m before receive m

Event ordering possible• Implementation: logical clocks

Page 81: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 81

Fundamental models:Interaction model

• Event orderingsend

receive

send

receive

m1 m2

2

1

3

4X

Y

Z

Physical time

Am3

receive receive

send

receive receive receivet1 t2 t3

receive

receive

m2

m1

Page 82: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 82

Fundamental models

• Aspects captured in models:– Interaction– Failure– Security

Page 83: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 83

Fundamental models:Failure model

• How can distributed systems fail?– Partial failures– of • processes

• communication channels

• Taxonomy– Process <> communication channels– Kind of failure: • Omission

• Arbitrary

• Timing

Page 84: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 84

Fundamental models:Failure model

• Omission failure= Failure to perform an action– Processes:

• Subclasses:– Crash no further execution

– Fail-stop crash + detection possible

• Consequences for asynchronous systems– Failure not detectable

– Reaching agreement impossible

– Communication:

Page 85: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 85

Fundamental models:Failure model

• Omission failure– Communication:

• Send-omission

• Receive-omission

• Channel-omissionprocess p process q

Communication channel

send

Outgoing message buffer Incoming message buffer

receivem

Page 86: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 86

Fundamental models:Failure model

• Arbitrary or Byzantine failures:= Worst possible failure semantics

• Any behavior possible

– Processes:• Omit processing steps

• Perform unintended steps

– Communication• Message contents corrupted

• Non-existing message delivered

• Messages delivered twice

• Rare: checksums, sequence numbers

Page 87: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 87

Fundamental models:Failure model

Class of failure Affects DescriptionFail-stop Process Process halts and remains halted. Other processes may

detect this state.Crash Process Process halts and remains halted. Other processes may

not be able to detect this state.Omission Channel A message inserted in an outgoing message buffer never

arrives at the other end’s incoming message buffer.Send-omission Process A process completes a send, but the message is not put

in its outgoing message buffer.Receive-omissionProcess A message is put in a process’s incoming message

buffer, but that process does not receive it.Arbitrary(Byzantine)

Process orchannel

Process/channel exhibits arbitrary behaviour: it maysend/transmit arbitrary messages at arbitrary times,commit omissions; a process may stop or take anincorrect step.

Page 88: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 88

Fundamental models:Failure model

• Timing failures– Applicable in synchronous systems

Class of Failure Affects Description

Clock Process Process’s local clock exceeds the bounds on itsrate of drift from real time.

Performance Process Process exceeds the bounds on the intervalbetween two steps.

Performance Channel A message’s transmission takes longer than thestated bound.

Page 89: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 89

Fundamental models:Failure model

• Masking failures– Approach:

• Hide

• Convert to a more acceptable failure

– Examples:• Checksums: corrupted message omission failure

• Retransmission of message: hide omission failure

Page 90: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 90

Fundamental models

• Aspects captured in models:– Interaction– Failure– Security

Page 91: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 91

Fundamental models:Security model

• Avoid unauthorized use of resources

• Secure processes and interactions

Communication channel

Copy of m

Process p Process qm

The enemym’

Page 92: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 92

Fundamental models:Security model

• Based on architectural model with – Clients– Servers: manage objects

Network

invocation

resultClient

Server

Principal (user) Principal (server)

ObjectAccess rights

Page 93: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 93

Protecting objects• Protecting objects/resources by

– giving access rights to users– associating with each invocation an authority (a user

with access rights) who allows for the use of the object or asked for it

e.g. user asks a remote process to print something on his printer the authority here is the user

• authority = PRINCIPAL • principal is user or process• server checks identity of authority and checks its

access rights• Works only if communication is secure

Page 94: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 94

Fundamental models:Security model

• Securing processes and interactions– Threats to processes

• False identification of sender of message

– Threats to communication channels• Copy, alter, inject messages

– Denial of service• Overload resource (channel, processor)

Page 95: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 95

Fundamental models:Security model

• Defeating security threats– Cryptography– Shared secretsAuthenticationSecure channels

Principal A

Secure channelProcess p Process q

Principal B

Page 96: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 96

Fundamental models:Security model

• Uses of model– Security straightforward? NO

• Processing cost

• Management cost

• Inconvenience for users

– Approach:• Analysis of all threats

• Acceptable cost

Page 97: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 97

Overview

• Definitions• Examples• Comparison: distributed versus ...• Resource sharing and the Web• Challenges• Architectural models• Fundamental Models • Summary

Page 98: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 98

Summary• Distributed systems:

– Computers– Processes– Messages– No common clock– Partial failures

Page 99: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 99

Summary

• Challenges– Heterogeneity– Openness– Security– Scalability– Failure handling – Concurrency– Transparency

Page 100: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 100

Summary• Architectural models:

– Variations on client-server+ Large scale resource sharing+ Management of concurrent updates+ QOS

• Reliability

• Security

• Performance

• adaptability

Page 101: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 101

Summary• Fundamental models:

– Interaction– Failure– security

Page 102: October 2005Distributed systems: Introduction1 Distributed Systems: Introduction.

October 2005 Distributed systems: Introduction 102

Distributed Systems:

Introduction