1 Distributed Systems Alexis Delis [email protected] Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

39
1 Distributed Systems Alexis Delis [email protected] Monday 6:00-9:00 Spring 2002 www.di.uoa.gr/~ad/ MDE519.html
  • date post

    18-Dec-2015
  • Category

    Documents

  • view

    214
  • download

    0

Transcript of 1 Distributed Systems Alexis Delis [email protected] Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

Page 1: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

1

Distributed Systems

Alexis Delis

[email protected]

Monday 6:00-9:00

Spring 2002

www.di.uoa.gr/~ad/MDE519.html

Page 2: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

2

Grades - Evaluation

Final Examination: 35%In-class Presentations & Homeworks: 30%

Project(s): 35%

Book: A.S. Tanenbaum, M. van Steen, Distributed Systems, Prentice Hall, 2002.

Other:Papers (available from the course’s WWW site)

Page 3: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

3

Definition of a Distributed System

A distributed system is:

A collection of independent computers that appears to its

users as a single coherent system.

Page 4: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

4

Definition of a Distributed System

A distributed system is organized as middleware.Note that the middleware layer may extend over multiple machines.

Examples: Workflow Systems, WWW-services (URL)

1.1

Page 5: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

5

Goals of Distributed Systems

• connecting users with resources• transparency• openess • scalability

Page 6: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

6

Transparency in a Distributed System

Different forms of transparency in a distributed system.

Transparency Description

AccessHide differences in data representation and how a resource 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 location while in use

ReplicationHide that a resource may be shared by several competitive 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 on disk

Page 7: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

7

Openness

Open DS: a system that offer services according to Standard Rules.

Such rules are described in terms of protocols

IDLs help in the description of such protocols.

Interoperability?Portability?Difference between the two?

Page 8: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

8

ScalabilityNumerous “definitions” of scalability system can be scalable in terms of size

Add more users/resources into the system

Geographically Scalable systemUsers/resources may lie far apart

Administratively ScalableEasy to manage even if it spans multiple orgs.

GOLDEN RULE: as system becomes scalable in one of these

three dimension exhibits loss in performance.

Page 9: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

9

Scalability Problems

Examples of scalability limitations.

Concept Example

Centralized services A single server for all users

Centralized data A single on-line telephone book

Centralized algorithmsDoing routing based on complete information

Page 10: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

10

Scaling Techniques

asynchronous communication filling (database) forms. distribution (take a component, break into smaller pieces, spread these components across the system

Example: DNS – Domain Name Service.Division in (non-overlapping) zones – domains

Page 11: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

11

Scaling Techniques

1.4

The difference between letting:

a) a server (character/string-based communication) or

b) a client check forms as they are being filled (bulk uploading).

Page 12: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

12

Scaling Techniques

1.5

An example of dividing the DNS name space into zones.

Page 13: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

13

Scalability - Caching

Generally Good Idea: Replicate (data/services)

Replication increases availability (of systems)

Caching (difference from replication?)

Main problem with caching/replication? Is this a serious problem? CDNs (how do they do it?)

Page 14: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

14

Hardware Concepts

1.6

Different basic organizations and memories in distributed computer systems

Page 15: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

15

Multiprocessors

A bus-based multiprocessor.

1.7

Page 16: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

16

Multiprocessors

a) A crossbar switch (n*n crosspoint switches needed)

b) An omega switching network (low latency problem)

c) How to avoid latency? use hierarchical schemes: NUMA (NonUniform Memory Access)

1.8

Page 17: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

17

Homogeneous Multicomputer Systems(building is “easy”-problem:interconnection network)

a) Bus-based (FDDI/ Fast-Ethernet /Gigabit network )b) Grid (switched based; messages are routed via the interconnection network)c) Hypercube(switched based; four dimensional (b); two ordinary cubes with 8

vertices and 12 edges)

1-9

Homogeneous Multi-computers: System Area Networks (SANs)

Page 18: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

18

Switched Multi-computersCan vary significantly…

From…

• Massively Parallel Processors ($$ MPP – CM5, IBM SP2 etc.)

To..

• Clusters/Networks of Workstations (cheap$ - COWs or NOWs)

Page 19: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

19

Software Concepts

An overview between • DOS (Distributed Operating Systems)• NOS (Network Operating Systems)• Middleware

System Description Main Goal

DOSTightly-coupled operating system for multi-processors and homogeneous multicomputers

Hide and manage hardware resources

NOSLoosely-coupled operating system for heterogeneous multicomputers (LAN and WAN)

Offer local services to remote clients

MiddlewareAdditional layer atop of NOS implementing general-purpose services

Provide distribution transparency

Page 20: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

20

Uniprocessor Operating Systems

Separating applications from operating system code through a microkernel.

1.11

Page 21: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

21

Multiprocessor Operating Systems

A monitor to protect an integer against concurrent access.

monitor Counter {

private:

int count = 0;

public:

int value() { return count;}

void incr () { count = count + 1;}

void decr() { count = count – 1;}

}

Page 22: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

22

Multiprocessor Operating Systems (2)

A monitor to protect an integer against concurrent access, but blocking a process.

monitor Counter {

private:

int count = 0;

int blocked_procs = 0;

condition unblocked;

public:

int value () { return count;}

void incr () {

if (blocked_procs == 0)

count = count + 1;

else

signal (unblocked);

}

void decr() {

if (count ==0) {

blocked_procs = blocked_procs + 1;

wait (unblocked);

blocked_procs = blocked_procs – 1;

}

else

count = count – 1;

}

}

Page 23: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

23

Distributed Shared Memory Systems (DSM)

a) Pages of address space distributed among four machines

b) Situation after CPU 1 references page 10

c) Situation if page 10 is read only and replication is used

Trick: replicate pages that are referenced frequently!Another: replicate all pages (??) – problems? Solutions?

Page 24: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

24

Distributed Shared Memory Systems•Always an issue: size of a page in DSM – why?•Large sized page are potentially good but they may entail false sharing•Having data belonging to two independent processes in the same page…

Page 25: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

25

Network Operating System

General structure of a network operating system.

1-19

Page 26: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

26

Network Operating System

Two clients and a server in a network operating system.

• Services allowed to users…

• rlogin machineA

• rcp machineA:file1 machineB:file2

• ftp, http, sftp, ssh, etc.

1-20

Page 27: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

27

Network Operating System

Different clients may mount the servers in different places.

1.21

•Issue of FS mount-ing

Page 28: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

28

Positioning Middleware

General structure of a distributed system as middleware.

1-22

Page 29: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

29

Middleware and Openness

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.

1.23

Page 30: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

30

Comparison between Systems

A comparison between multiprocessor operating systems, multicomputer operating systems, network operating systems, and middleware based distributed systems.

ItemDistributed OS

Network OS

Middleware-based OSMultipro

c.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

Shared memory

Messages FilesModel

specific

Resource management

Global, central

Global, distributed

Per node Per node

Scalability No Moderately Yes Varies

Openness Closed Closed Open Open

Page 31: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

31

Clients and Servers

General interaction between a client and a server.

1.25

Page 32: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

32

An Example Client and Server

The header.h file used by the client and server.

Page 33: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

33

An Example: The Server

A sample server.

Page 34: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

34

An Example: The Client

A client using the server to copy a file.

1-27 b

Page 35: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

35

Three Processing Levels

The general organization of an Internet Search Engine into three different layers

1-28

Page 36: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

36

Multitiered Architectures

Alternative client-server organizations (a) – (e).

1-29

Page 37: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

37

Multitiered Architectures

An example of a server acting as a client.

1-30

Page 38: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

38

Modern Architectures

An example of horizontal distribution of a Web service.

1-31

Page 39: 1 Distributed Systems Alexis Delis ad@di.uoa.gr Monday 6:00-9:00 Spring 2002 ad/MDE519.html.

39

Ongoing (Research) Work

• DSs based on Horizontal Distribution(of data/services)

• DSs based on Horizontal and/or Vertical Distribution (of data/services)

• Peer-to-Peer– Distributions of data– Services (indexing, querying, TP processing)– Self-organizing systems