Transcript chap-01

Introduction
Chapter 1
1
Definition of a Distributed System (1)
A distributed system is:
A collection of independent
computers that appears to its
users as a single coherent
system.
2
Definition of a Distributed System (2)
1.1
A distributed system organized as middleware.
3
Note that the middleware layer extends over multiple machines.
Examples of DS
1. The Internet
1. Vast interconnected collection of computer network of
many different types
2. Intranets
1. Portion of Internet that is separately administrated and has a
boundary that can be configured to enforce local security
policy.
3. Mobile and ubiquitous computing
1. Small and portable computing device.
2. Laptops computers.
3. PDA, mobiles phone, pagers, video cameras and digital
cameras.
4. Wearable device, such as smart watches
5. Devices embedded in appliances- hi-fi+washing machine
using one “universal remote control”.
4
Transparency in a Distributed System
Transparency
Description
Access
Hide 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
Relocation
Hide that a resource may be moved to another
location while in use
Replication
Hide that a resource is replicated
Concurrency
Hide that a resource may be shared by several
competitive users
Failure
Hide the failure and recovery of a resource
Persistence
Hide whether a (software) resource is in memory or
on disk
Different forms of transparency in a distributed system.
5
Scalability
A system is described scalable
if remain effective when there is a
significant increase in the number
of resources and users
Date
1979, Dec.
1989, July
1999, July
Web servers
Computers
188
0
130,000
56,218,000
0
5,560,866
6
Scalability Problems
Concept
Example
Centralized services
A single server for all users
Centralized data
A single on-line telephone book
Centralized algorithms
Doing routing based on complete information
Examples of scalability limitations.
7
Scaling Techniques (1)
1.4
The difference between letting:
a) a server or
b) a client check forms as they are being filled
8
Scaling Techniques (2)
1.5
An example of dividing the DNS name space into zones.
9
Lecture 2
Hardware Concepts
Multiprocessors
Homogenous Multicomputer System
Software Concepts
Distributed OS
Uniprocessor Operating Systems
Multiprocessor Operating System
Multicomputer Operating System
Distributed Shared Memory
Network OS
Middleware
10
Hardware Concepts
1.6
Different basic organizations and memories in distributed computer
11
systems
Multiprocessors (1)
1.7
A bus-based multiprocessor.
a) Coherent
b) Incoherent – while using the cache
12
Multiprocessors (2)
a) A crossbar switch
b) An omega switching network
1.8
13
Homogeneous Multicomputer Systems
1-9
a) Grid
b) Hypercube
14
Software Concepts
1. DS as resource manager
2. Provide Virtual Machine to hide the
heterogeneous nature of underlying hardware
15
Software Concepts
System
Description
Main Goal
DOS
Tightly-coupled operating system for multiprocessors 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
An overview of
• DOS (Distributed Operating Systems)
• NOS (Network Operating Systems)
• Middleware
16
DOS (Distributed Operating Systems)
• Multiprocessor Operating System
– Manage the resource of multiprocessor
• Multicomputer Operating System
– Develop for homogenous multicomputer
17
Uniprocessor Operating Systems
• The goal- user and application sharing resources
• User mode & kernel mode- Controlled by OS.
• Separating applications from operating system code
through a microkernel-code for device register, switching
between process etc.
18
Multicomputer Operating Systems (1)
General structure of a multicomputer operating system
1.14
19
Multicomputer Operating Systems (2)
• Alternatives for blocking and buffering in message passing.
• Leading to 4 possible synchronization point.
1.15
20
Multicomputer Operating Systems (3)
Synchronization point
Send buffer
Reliable comm.
guaranteed?
Block sender until buffer not full (s1)
Yes
Not necessary
Block sender until message sent (s2)
No
Not necessary
Block sender until message received (s3)
No
Necessary
Block sender until message delivered (s4)
No
Necessary
Relation between blocking, buffering, and reliable
communications.
21
Distributed Shared Memory Systems (1)
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
22
Distributed Shared Memory Systems (2)
False sharing of a page between two independent processes.
1.18
23
Network Operating System(1)
• Heterogeneous.
– Variety and difference in terms of:
•
•
•
•
•
Networks
Computer hardware
Operating system
Programming language
Implementation by different developers
• Constructed from a collection of uniprocessor
system using own OS.
• Connected to each other using computer
network.
24
Network Operating System (2)
General structure of a network operating system.
1-19
25
Network Operating System (3)
Two clients and a server in a network operating system.
1-20
Generally maintain hierarchical file system.
Client can import/mount these file system.
26
Network Operating System (3)
Different clients may mount the servers in different places.
1.21
#showmount –e <server_name>
#mount /mygames <server_name>/private/games
27
Positioning Middleware
– Programs written by different developers cannot communicate unless
use common standard
– Middleware applied to a software masking the heterogeneity of
hardware & software
1-22
General structure of a distributed system as middleware.
28
Middleware Services
1. Communication facilities – message passing
eg: RPC & Distributed Object Invocation.
2. Naming- URL still works even the server has
been moved.
3. Persistence – special facilities for storage.
4. Distributed Transactions- multiple read/write
operations atomicaly.
5. Security – cannot rely on OS only.
29
Middleware and Openness
1.23
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.
30
Comparison between Systems
Item
Distributed OS
Network
OS
Middlewarebased OS
Multiproc.
Multicomp.
Very High
High
Low
High
Yes
Yes
No
No
Number of copies of OS
1
N
N
N
Basis for communication
Shared
memory
Messages
Files
Model specific
Resource management
Global,
central
Global,
distributed
Per node
Per node
Scalability
No
Moderately
Yes
Varies
Openness
Closed
Closed
Open
Open
Degree of transparency
Same OS on all nodes
A comparison between multiprocessor operating systems,
multicomputer operating systems, network operating systems, and
middleware based distributed systems.
31
Clients and Servers
– General interaction between a client and a server.
– Request and reply behavior.
– Connectionless vs connection oriented protocol.
32
An Example Client and Server (1)
The header.h file used by the client and server.
33
An Example Client and Server (2)
A sample server.
34
An Example Client and Server (3)
1-27 b
A client using the server to copy a file.
35
Processing Level
The general organization of an Internet
search engine into three different layers
1-28
36
Multitiered Architectures (1)
• 2 types of machines –two-tiered architecture
client just a dumb terminal(user interface)
» Server is handle everything
»
• Alternative client-server organizations (a) – (e).
1-29
37
Multitiered Architectures (2)
An example of a server acting as a client.
eg: transaction processing – next chap
1-30
38
Modern Architectures
•
Multitier Client Server Architecture–
–
•
Divide application into 3 components
vertical distribution
Modern Architecture is more consent about the distribution of
client and the servers.
–
An example of horizontal distribution of a Web service.
39
Summary
(INTRODUCTION)
•
•
•
•
•
DS: autonomous computer+single coherent
system.
Goals
Hardware Concept
Software Concept
Client Server model-application layering
» Vertical distribution vs horizontal distribution
40
Exercise
Do the problems on page 54 and 55.
Eg: #4,#6,#15,#17
 Ask the student in a group to find a journal about
the distributed system. Work into group, (5- 6
people) each group. Make a synopsis and give a
critique.
41