Top Banner
-1- Distributed System Prepared by: Thoi Nam Lectured by: Phm Trn Vũ
24

Distributed System - CSE

Mar 07, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Distributed System - CSE

-1-

Distributed System

Prepared by: Thoại Nam

Lectured by: Phạm Trần Vũ

Page 2: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -2-

Resources

� Textbook:

– Distributed Systems: Concepts and Design, Edition 4, ©

Addison Wesley 2005, by George Coulouris, Jean

Dillimore and Tim Kindberg

Page 3: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -3-

Introduction

� Distributed Systems

� Hardware & software

� Transparency

� Scalability

� Distributed OS

Page 4: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -4-

Definition of a Distributed System

� A distributed system:

– Multiple connected CPUs working together

– A collection of independent computers that appears to its users as a single coherent system

� Examples: parallel machines, networked machines

Page 5: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -5-

Distributed System Examples: The Internet

intranet

ISP

desktop computer:

backbone

satellite link

server:

%

network link:

%

%

%

Page 6: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -6-

Distributed Systems Examples: Intranets

the rest of

email server

Web server

Desktopcomputers

File server

router/firewall

print and other servers

other servers

print

Local area

network

email server

the Internet

Page 7: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -7-

Distributed System Examples: Systems of Portable and Handheld Devices

Laptop

Mobile

Printer

Camera

Internet

Host intranet Home intranetWAP

Wireless LAN

phone

gateway

Host site

Page 8: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -8-

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 12

2001, July 125,888,197 31,299,592 25

42,298,371

Page 9: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -9-

Potentials and Challenges

� Potentials

– Communication and resource sharing possible

– Economics – price-performance ratio

– Reliability, scalability

– Potential for incremental growth

� Challenges

– Heterogeneity of resources

– Distribution-aware PLs, OSs and applications

– Design of scalable systems

– Network connectivity essential

– Security and privacy

– Failure handling

– Concurrency

Page 10: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -10-

Transparency in a Distributed System

Different forms of transparency in a distributed system.

Hide whether a (software) resource is in memory or on diskPersistence

Hide the failure and recovery of a resourceFailure

Hide that a resource may be shared by several competitive usersConcurrency

Hide that a resource may be shared by several competitive usersReplication

Hide that a resource may be moved to another location while in use

Relocation

Hide that a resource may move to another locationMigration

Hide where a resource is locatedLocation

Hide differences in data representation and how a resource is accessed

Access

DescriptionTransparency

Page 11: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -11-

Scalability Problems

Examples of scalability limitations.

Doing routing based on complete information

Centralized algorithms

A single on-line telephone bookCentralized data

A single server for all usersCentralized services

ExampleConcept

Page 12: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -12-

Distributed Systems Models

� Minicomputer model

– Each user has local machine

– Local processing but can fetch remote data (files, databases)

� Workstation model

– Processing can also migrate

� Client-server Model

– User has local workstation

– Powerful workstations serve as servers (file, print, DB servers)

� Peer-to-Peer

– No distinction in the roles of servers and clients

� Processor pool model

– Terminals are Xterms or diskless terminals

– Pool of backend processors handle processing

Page 13: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -13-

Client-Server Model

Server

Client

Client

invocation

result

Serverinvocation

result

Process:Key:

Computer:

Page 14: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -14-

Peer-to-Peer Model

Application

Application

Application

Peer 1

Peer 2

Peer 3

Peers 5 .... N

Sharableobjects

Application

Peer 4

Page 15: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -15-

Uniprocessor Operating Systems

� An OS acts as a resource manager or an arbitrator

– Manages CPU, I/O devices, memory

� OS provides a virtual interface that is easier to use than hardware

� Structure of uniprocessor operating systems

– Monolithic (e.g., MS-DOS, early UNIX)

» One large kernel that handles everything

– Layered design

» Functionality is decomposed into N layers

» Each layer uses services of layer N-1 and implements new service(s) for layer N+1

Page 16: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -16-

Uniprocessor Operating Systems

Microkernel architecture

• Small kernel

• user-level servers implement additional functionality

Page 17: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -17-

Distributed Operating System

� Manages resources in a distributed system

– Seamlessly and transparently to the user

� Looks to the user like a centralized OS

– But operates on multiple independent CPUs

� Provides transparency

– Location, migration, concurrency, replication,…

� Presents users with a virtual uniprocessor

Page 18: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -18-

Types of Distributed OSs

Provide distribution transparency

Additional layer atop of NOS implementing general-purpose services

Middleware

Offer local services to remote clients

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

NOS

Hide and manage hardware resources

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

DOS

Main GoalDescriptionSystem

Page 19: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -19-

Multiprocessor Operating Systems

� Like a uniprocessor operating system

� Manages multiple CPUs transparently to the user

� Each processor has its own hardware cache

– Maintain consistency of cached data

Page 20: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -20-

Multicomputer Operating Systems

1.14

Page 21: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -21-

Network Operating System (1)

1-19

Page 22: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -22-

Network Operating System (2)

� Employs a client-server model

– Minimal OS kernel

– Additional functionality as user processes

1-20

Page 23: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -23-

Middleware-based Systems

� General structure of a distributed system as middleware.

1-22

Page 24: Distributed System - CSE

Khoa Khoa Học và Kỹ Thuật Máy Tính – Trường Đại Học Bách Khoa -24-

Comparison between Systems

OpenOpenClosedClosedOpenness

VariesYesModeratelyNoScalability

Per nodePer nodeGlobal, distributed

Global, central

Resource management

Model specificFilesMessagesShared memory

Basis for communication

NNN1Number of copies of OS

NoNoYesYesSame OS on all nodes

HighLowHighVery HighDegree of transparency

Multicomp.Multiproc.

Middleware-

based OS

Network

OS

Distributed OSItem