Professional Documents
Culture Documents
cs5223
Lecture 01 (2004-01-06)
Seif Haridi
Department of Computer Science,
NUS
haridi@comp.nus.edu.sg
Course overview
Getting started (introduction to distributed
systems and distributed algorithms)
Held by me
Overview
Content
Summary
Reading suggestions
Reading of papers
Ingroups of two or three
Each group will read one or two research papers
Questions
There is a discussion group for each book
chapter/lectures
There is a discussion group for general matters
Submit your assignments using the
corresponding Workbin (IVLE)
2002-08-15 S. Haridi, CS2104, Lecture 01 16
Feedback in General
Approach me directly, (any time) or arrange
for appointment
Do not be afraid!
Processor
Process
Communication
Thread Medium
Communication channel
Node: processor/process
2002-08-15 S. Haridi, CS2104, Lecture 01 22
Distributed system
Set of computing nodes that cooperate in
order to achieve a well defined goal
No shared-memory
Distributed software
No centralized OS, each PE has its own copy of OS
No physically centralized file system
Distributed applications
2002-08-15 S. Haridi, CS2104, Lecture 01 25
Why distributed systems?
Information exchange (collaborative work)
Resource sharing (e.g. printer, backup
storage, disk units, etc.)
Resource sharing (applications, information,
media, services)
Cost reduction
Increase of availability (partial-failure)
Increase of performance through
parallelism,...
2002-08-15 S. Haridi, CS2104, Lecture 01 26
Main characteristics
No shared memory between nodes
Each node has its memory
Communication by message passing
No global clock
Each node has its own clock
Airlinereservation system
Bank automated teller machine network
Internet
Mobile computing
backbone
satellite link
desktop computer:
server:
network link:
Local area
Web server network
email server
print
File server
other servers
the rest of
the Internet
router/firewall
Location Transparency
Hide where a resource/service is located
Migration Transparency
Hides that a resources/service may be moved
to another location while in use
2002-08-15 S. Haridi, CS2104, Lecture 01 36
Transparency
Relocation Transparency
Hides that a resource maybe moved to
another location (machine/node)
Failure Transparency
Hide the failure and recovery of a resource
Concurrency Transparency
Hides that a resources may be shared by a
number of competitive uses/processes
2002-08-15 S. Haridi, CS2104, Lecture 01 37
Transparency
Transparency Description
Hide differences in data representation and how a resource is
Access
accessed
Location Hide where a resource is located
Migration Hide that a resource may move to another location
Hide that a resource may be moved to another location while in
Relocation
use
Hide that a resource may be shared by several competitive
Replication
users
Hide that a resource may be shared by several competitive
Concurrency
users
Failure Hide the failure and recovery of a resource
1.4
1.5
Distributed System DS
Transportation, etc.
Distributed snapshots
Detecting stable properties, Diffusing computation
Modeling a distributed computation
Expressing correctness properties of a dist. algo.
Failures in a distributed system
w o rk
s t a t io n s a lo c a l n e t w o r k
T h e In te rn e t
a n e tw o r k h o s t
t e r m in a l
m a in f r a m e c o m p u t e r
w o r k s t a t io n
n e t w o r k lin k
n e tw o rk h o s t
c e n t r a liz e d c o m p u tin g
d is tr ib u t e d c o m p u tin g
Networks.
te r m in a te d
sta rt
queued
e x it
d is p a t c h r u n n in g
re ady
e v e n t c o m p le t io n w a it in g
fo r ev en t
b lo c k e d
Java object
a servlet
request a process
response
Processes
P1
P2
P3
P4
time
Timesharing of a resource
2002-08-15 S. Haridi, CS2104, Lecture 01 83
Concurrent processing within
a process
It is often useful for a process to have parallel threads of execution,
each of which timeshare the system resources in much the same
way as concurrent processes.
A p a r e n t p r o c e s s m a y s p a w n c h ild p r o c e s s e s . A p r o c e s s m a y s p a w n c h ild th r e a d s
a p ro c ess
p aren t p ro c ess
m a in t h r e a d
c h ild t h r e a d 1
c h ild t h r e a d 2
c h ild p r o c e s s e s
f e t c h v a lu e in c o u n t e r a n d lo a d in t o a r e g is t e r f e t c h v a lu e in c o u n t e r a n d lo a d in t o a r e g is t e r
in c r e m e n t v a lu e in r e g is t e r f e t c h v a lu e in c o u n t e r a n d lo a d in t o a r e g is t e r
s t o r e v a lu e in r e g is t e r t o c o u n t e r in c r e m e n t v a lu e in r e g is t e r
in c r e m e n t v a lu e in r e g is te r
f e t c h v a lu e in c o u n t e r a n d lo a d in t o a r e g is t e r
in c r e m e n t v a lu e in r e g is te r s t o r e v a lu e in r e g is t e r t o c o u n t e r
s to r e v a lu e in r e g is te r to c o u n te r s to r e v a lu e in r e g is te r to c o u n te r
in s t r u c t io n e x e c u t e d in c o n c u r r e n t p r o c e s s o r t h r e a d 1
in s t r u c t io n e x e c u t e d in c o n c u r r e n t p r o c e s s o r t h r e a d 2
T r a n s p o r t la y e r T r a n s p o r t la y e r
I n t e r n e t la y e r I n t e r n e t la y e r
P h y s ic a l la y e r P h y s ic a l la y e r
T h e I n te r n e t n e tw o r k a r c h ite c tu r e
2002-08-15 S. Haridi, CS2104, Lecture 01 93
The TCP/IP Protocol Suite -2
The Internet layer implements the Internet
Protocol, which provides the functionalities for
allowing data to be transmitted between any
two hosts on the Internet.
The Transport layer delivers the transmitted
data to a specific process running on an
Internet host.
The Application layer supports the programming
interface used for building a program.
Email Addresses
a n In te rn e t h o s t
s u b n e ts
T h e In te rn e t b a c k b o n e
T h e I n t e r n e t T o p o lo g y M o d e l
reserved
reserved address 1 1 1 10 reserved
follows: 01000001
00011000
00110010
00000000
00000000
00000001
root
to p -le v e l d o m a in
com co u n try co d e
edu gov net org m il
in t h e U .S .
o r g a n iz a t io n T o p - le v e l d o m a in n a m e h a s t o b e a p p lie d f o r .
S u b d o m a in h ie r a c h y a n d n a m e s a r e a s s ig n e d
b y th e o r g a n iz a tio n .
...
s u b d o m a in
...
host nam e
c o u n tr y c o d e
u c s b .e d u ... c a lp o ly . e d u ...
c s c ... e e e n g lis h . . . w ir e le s s
cs ... e c e ...
host B
...
process
...
port
The Internet
d a y t im e 13 p r o v id e s t h e c u r r e n t d a t e a n d t im e
ftp 21 f ile t r a n s f e r p r o t o c o l
t e ln e t 23 r e m o t e , c o m m a n d - lin e t e r m in a l s e s s io n
s m tp 25 s im p le m a il t r a n s f e r p r o t o c o l
t im e 37 p r o v id e s a s t a n d a r d t im e
f in g e r 79 p r o v id e s in f o r m a t io n a b o u t a u s e r
h ttp 80 w e b s e rv e r
R M I R e g is t r y 1099 r e g is tr y fo r R e m o te M e th o d In v o c a tio n
w e b s e r v e r w h ic h s u p p o r t s
s p e c ia l w e b s e r v e r 8080
s e r v le t s , J S P , o r A S P
2002-08-15 S. Haridi, CS2104, Lecture 01 113
Choosing a port to run your
program
For programming: when a port is needed,
choose a random number above the well
known ports: 1,024- 65,535.
For providing a network service for the
community, then arrange to have a port
assigned to and reserved for your service.
section name
file name
host name
directory path
protocol of server port number of server process
Distributed system
Email addresses
2002-08-15 S. Haridi, CS2104, Lecture 01 120