Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional...

40
Distributed Systems 1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s ) Traditional Computer Architecture
  • date post

    18-Dec-2015
  • Category

    Documents

  • view

    221
  • download

    0

Transcript of Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional...

Page 1: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 1

Chapter 2: Concepts and Architectures

CPU

Memory

I/O

Disk(s)

Traditional Computer Architecture

Page 2: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 2

Computer System Architectures

Flynn, 1966+1972 classification of computer systems in terms of instruction and data stream organizations

Based on Von-Neumann model (separate processor and memory units

4 machine organizations SISD - Single Instruction, Single Data SIMD - Single Instruction, Multiple Data MISD - Multiple Instruction, Single Data MIMD - Multiple Instruction, Multiple Data

Page 3: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 3

Flynn Architectures (1)

Array Processor

Serial ProcessorCU PUI

PU1

PUn

D

I

D1

DnCU

CU – control unitPU – processor unitI – instruction streamD – data stream

SISD

SIMD

Page 4: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 4

Flynn Architectures (2)CU1 PU1

I1 D1

CUn PUnIn Dn

MultiprocessorandMulticomputer

MIMD

CU1 PU1

I1

D

CUn PUn

In

MISD

No real examples- possibly some pipeline architectures

Page 5: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 5

Processor-Memory Interconnection Network

Page 6: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 6

Crossbar switch

Page 7: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 7

Multiple stage switch

Page 8: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 8

Homogeneous Multicomputer Systems – Processor Arrays

Grid Hypercube

Page 9: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 9

Loosely coupled multi-computer systems

Distributed Memory Multi-computer IPC by message passing Typically PC or workstation clusters Physically distributed components Characterized by longer message delays

and limited bandwidth

M P M P M Pnetwork

Page 10: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 10

Closely coupled multi-computer systems

Shared Memory Multiprocessor Processors connected via common bus or fast

network Characterized by short message delays, high bandwidth IPC via Shared Memory

M P M P M P M P

I/O

Shared Memory

Page 11: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 11

Network based Systems

Network size: number of nodes N Node: ni, 1 i N Distance: d(ni, nj): number of links between ni and

nj Network distance: D = max(d(ni, nj)) Degree: degree(ni): number of links from/to ni Network topology is an abstract graph to represent

the architecture of a network

Page 12: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 12

Desired Properties:

(1) When network size grows arbitrarily, the network distance increases very slowly: lim D/N = 0

N (2) There exists a constant k, such that degree(ni) k (3) Routing algorithm is easy to implement and indepe

ndent of network size (4) When some nodes or links are failed, the network is

still connected (with lower performance) (5) Trafic loads are evenly distributed over the network

Page 13: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 13

Typical network topologies:

star ring B-tree

complete regular arbitrary

Page 14: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 14

Evaluation of network topologies:

star ring B-treecomplet

eregular

arbitrary

lim D/N=0 N

yesD = 2

NoD = N-1

YesD=2log N

YesD = 1

YesD =√N

Do not know

Kdegree(ni)

no YesK = 2

YesK = 3

No YesK = 4

Do not know

Routing easy easy easy easy easy hard

connectivity

bad bad Not good

best good Do not know

Even trafic

no yes no yes yes Do not know

Page 15: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 15

Software Concepts

DOS (Distributed Operating Systems) NOS (Network Operating Systems) Middleware

System Description Main Goal

DOS

Tightly-coupled operating system for multi-processors 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

Page 16: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 16

Uniprocessor Operating System

Separating applications from operating system code through a microkernel.

Page 17: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 17

Distributed Operating System

Tightly-coupled operating system for multi-

processors and homogeneous multi-computers. Strong transparency.

Page 18: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 18

DOS: characteristics (1)

Distributed Operating Systems Allows a multiprocessor or multicomputer network

resources to be integrated as a single system image Hide and manage hardware and software resources provides transparency support provide heterogeneity support control network in most effective way consists of low level commands + local operating sy

stems + distributed features Inter-process communication (IPC)

Page 19: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 19

DOS: characteristics (2)

remote file and device access global addressing and naming trading and naming services synchronization and deadlock avoidance resource allocation and protection global resource sharing deadlock avoidance communication security no examples in general use but many research system

s: Amoeba, Chorus etc. see Google “distributed systems research”

Page 20: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 20

Network Operating System

Loosely-coupled operating system for heterogeneous multi-computers (LAN and WAN). Weak transparency.

Page 21: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 21

NOS: characteristics

Network Operating System extension of centralized operating systems offer local services to remote clients each processor has own operating system user owns a machine, but can access others (e.

g. rlogin, telnet) no global naming of resources system has little fault tolerance e.g. UNIX, Windows NT, 2000

Page 22: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 22

Middleware System

Additional layer on the top of NOS implementing general-purpose services. Better transparency.

Page 23: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 23

Middleware Examples Examples: Sun RPC, CORBA, DCOM, Java RMI (distributed object t

echnology) Built on top of transport layer in the ISO/OSI 7 layer reference mode

l: application (protocol), presentation (semantic), session (dialogue), transport (e.g. TCP or UDP), network (IP, ATM etc), data link (frames, checksum), physical (bits and bytes)

Most are implemented over the internet protocols Masks heterogeneity of underlying networks, hardware, operating

system and programming languages – so provides a uniform programming model with standard services

3 types of middleware: transaction oriented (for distributed database applications) message oriented (for reliable asynchronous communication) remote procedure calls (RPC) – the original OO middleware

Page 24: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 24

Types of communication

Message passing is the general basis of communication in a distributed system: transferring a set of data from a sender to a receiver.

Page 25: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 25

Point-to-point Message passing

sender calls send primitive to pass message to sender’s buffer communication module transmits the message to the destination destination communication module puts the message to

receiver’s buffer receiver calls receive primitive to get the message

Page 26: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 26

Distributed Shared Memory

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

Page 27: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 27

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

Comparison between Systems

Page 28: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 28

Client-Server Model

Page 29: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 29

Timing interaction between client and server

Page 30: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 30

An Example Client and Server (1) header.h

Page 31: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 31

An Example Client and Server (2) server.c

Page 32: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 32

An Example Client and Server (3) client.c

Page 33: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 33

Multi-tiered (client-server) Architectures

Page 34: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 34

Comparison of different models(1)

terminal Interface-level

Processing-level

Data-level

user computer

(a) Traditional terminal/machine

Page 35: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 35

Comparison of different models(2)

Processing

Client browser

WEB serverProcessing

Data

Processing

DataInterface

Data server

Processing-level

Interface-level

Processing-level

Data-level

client server

(b) two-tiers

(c) three-tiers

Page 36: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 36

Internet search engine into three different layers:

Page 37: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 37

Alternative client-server organizations

Page 38: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 38

Enterprise(J2EE) Application Model

Page 39: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 39

A Modern Architecture

An example of horizontal distribution of a Web service.

Page 40: Distributed Systems1 Chapter 2: Concepts and Architectures CPU Memory I/O Disk(s) Traditional Computer Architecture.

Distributed Systems 40

Advantages of Multi-tiered Architectures

flexibility of selecting different hardware components

easy to maintain and manage the system easy to update or re-organize the system easy to enforce different security

policies at different levels easy to implement software modules

with clearly defined interfaces