SlideShare una empresa de Scribd logo
1 de 65
Slides for Chapter 1
Introduction to Distributed System and
Computing
From Coulouris, Dollimore and Kindberg
Distributed Systems:
Concepts and Design
Edition 4, © Pearson Education 2005
Reference slides from Distributed Computing Introduction, M. Liu
And Java programming, D. Liang
Distributed system, distributed computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Early computing was performed on a single
processor. Uni-processor computing can be called
centralized computing.
A distributed system is a collection of independent
computers, interconnected via a network, capable of
collaborating on a task by message passing. It has
three features:
Concurrency
No global clock
Independent failure
Distributed computing is computing performed in a
distributed system.
Examples of Distributed Systems
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Web Search: major growth industry in the last decade. 10 billion per
month for global number of searches. Complex task for searching a big
database with 63 billion pages. (e.g. Google distributed infrastructure, file
system, storage, lock service, parallel computing)
Massively multiplayer online games: Large number of people interact
through the Internet with a virtual world. Challenges include fast response
time, real-time propagation of events.
Financial trading: provides real-time access to a wide range of information
sources such as current share prices and trends, economic and political
development news. Challenges include how to deliver events reliably and
in a timely manner to very large numbers of clients.
Trend in Distributed Systems
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Pervasive networking and modern Internet: Wifi, WiMax, Bluetooth, the third-
generation of mobile phone networks. The result is that networking has
become a pervasive resource and devices can be connected at any time and
in any place.
Mobile and ubiquitous computing: small and portable computing devices are
integrated into the distributed system such as laptop, handheld
devices( PDA, cell phone, camera etc).
Distributed multimedia systems: it support a range of media types such as
audio, video in a distributed system. So desktop can access live television,
file libraries, music libraries, telephone IP phone (Skype) in distributed
system. QoS issue
Distributed Computing as a utility: A number of companies provide the
computing, storage and application resources as a commodity or utility to
users. So users do not need to maintain local IT. Pay as use. Analogy
between distributed resources and other utilities such a water or electricity.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
intranet
ISP
desktop computer:
backbone
satellite link
server:
network link:
Figure 1.1
A typical portion of the Internet
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 1.2
A typical intranet
the rest of
email server
Web server
Desktop
computers
File server
router/firewall
print and other servers
other servers
print
Local area
network
email server
the Internet
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 1.3
Portable and handheld devices in a distributed system
Laptop
Mobile
Printer
Camera
Internet
Host intranet Home intranet
WAP
Wireless LAN
phone
gateway
Host site
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 1.4
Web servers and web browsers
Internet
BrowsersWeb servers
www.google.com
www.cdk3.net
www.w3c.org
Protocols
Activity.html
http://www.w3c.org/Protocols/Activity.html
http://www.google.comlsearch?q=kindberg
http://www.cdk3.net/
File system of
www.w3c.org
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 1.5
Computers in the Internet
Date Computers Web servers
1979, Dec. 188 0
1989, July 130,000 0
1999, July 56,218,000 5,560,866
2003, Jan. 171,638,297 35,424,956
Centralized vs. Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
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 h o s t
n e t w o r k lin k
t e r m in a l
c e n t r a l i z e d c o m p u t i n g
d i s t r i b u t e d c o m p u t i n g
Evolution of paradigms
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Client-server: Socket API, remote method invocation
Distributed objects
Object broker: CORBA
Network service: Jini
Object space: JavaSpaces
Mobile agents
Message oriented middleware (MOM): Java Message
Service
Collaborative applications
Why distributed computing?
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Resource sharing/Economics: distributed systems allow
the pooling of resources, including CPU cycles, data
storage, input/output devices, and services.
Scalability: Increasing demands and users can be easily
addressed by adding more resources and the system can
still run effectively.
Reliability: a distributed system allow replication of
resources and/or services, thus reducing service outage
due to failures.
The affordability of computers and availability of network
access: The Internet has become a universal platform for
distributed computing.
The Challenges of Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
The Challenges of distributed computing:
Heterogeneity: computers and networks are of different
types. Including hardware, network, programming
language, and operating system.
E.g. Two alternatives for byte ordering of integers on different hardware, namely big-
endian and little-endian. Message transfer should take care of it.
E.g. The different types of networks are masked by the fact that all computers
attached to the Internet use the Internet protocols to communicate.
E.g. Different OS may provide the different programming interface for message
exchanges. Like different calls in UNIX and Windows.
E.g. Different programming languages use different representations for characters
and data structures. Difference must be handled if two need to communicate.
E.g. Different programs written by different developers even same language may
use different communication protocols and primitive data items and data structures
in messages.
The Challenges of Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Failure handling: Failures in a distributed system are partial-
that is, some components fail while others continue to function.
So is particularly difficult.
Detecting failures: some can be detected (checksum) and some may not.
Masking failures: detected and can be hidden or made less severe. a. message
can be retransmitted b. file data can be save on two disks if one fails, the other one
works.
Tolerating failures: not possible to detect all and hide all. Just report the error.
Recovery from failure: software so that the state of permanent data can be
recovered or rolled back after a server crash.
Redundancy: redundant components. a. two routes between two routers. b.
Domain name system, every name table is replicated in at least two servers. c.
database may be replicated in different servers. Redirect client to other servers
The design of effective techniques for keeping replicas of rapidly changing data up-to-
date without excessive loss of performance is challenging.
The Challenges of Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Concurrency: several clients may attempt to access a
shared resource at the same time. For example, auction bid
data structure by clients
Process manages a shared resource could take one
client request at a time. But that approach limits
throughput. So concurrent threads are usually allowed.
Smith: $122 and Jones: $111. If operations are
interleaved without any control, then they might get
stored as Smith: $1111 and Jones: $122
For data to be safe in a concurrent environment, its
operations must be synchronized in such a way that data
remains consistent such as semaphores.
The Challenges of Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Scalability: It will remain effective when there is a significant
increase in the number of resources and the number of users.
Controlling the cost of physical resources: as the demand for a
resource grows, it should be possible to extend the system at
reasonable cost.
Controlling the performance loss: Algorithm uses hierarchic structures
O(logN) scale better than those use linear structures O(N).
Preventing software resources running out: IP addresses start with 32
bits. New version 128 bits. Modification to software needed.
Avoiding performance bottleneck: algorithm should be decentralized to
avoid having performance bottleneck.
The Challenges of Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Security Concerns: In a distributed system, there are
more opportunities for unauthorized attack.
Confidentiality (protecting against disclosure to
unauthorized individuals);
Integrity (protection against alteration or corruption);
Availability (protection against interference with the
means to access the resource);
The Challenges of Distributed Computing
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Transparency: It is a major influence on the design of
the distributed system software
Defined as the concealment from the user and the
application programmer of the separation of
components in a distributed system, so that the
system is perceived as a whole rather than a
collection of independent component.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Transparencies
Access transparency: enables local and remote resources to be accessed using identical
operations.
Location transparency: enables resources to be accessed without knowledge of their
physical or network location (for example, which building or IP address).
Concurrency transparency: enables several processes to operate concurrently using shared
resources without interference between them.
Replication transparency: enables multiple instances of resources to be used to increase
reliability and performance without knowledge of the replicas by users or application
programmers.
Failure transparency: enables the concealment of faults, allowing users and application
programs to complete their tasks despite the failure of hardware or software components.
Mobility transparency: allows the movement of resources and clients within a system
without affecting the operation of users or programs.
Performance transparency: allows the system to be reconfigured to improve performance as
loads vary.
Scaling transparency: allows the system and applications to expand in scale without change
to the system structure or the application algorithms.
Operating Systems Basics
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Process and program
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
A process consists of an executing program, its
current values, state information, and the
resources used by the operating system to
manage its execution.
A program is an artifact constructed by a
software developer; a process is a dynamic
entity which exists only when a program is run.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Process State Transition Diagram
S i m p l i f e d f i n i t e s t a t e d i a g r a m f o r a p r o c e s s ' s l i f e t i m e
s t a r t
r e a d y
r u n n i n g
b l o c k e d
t e r m i n a t e d
d is p a t c h
q u e u e d
e v e n t c o m p le t io n w a it in g
f o r e v e n t
e x it
Java processes
There are three types of Java program:
applications, applets, and servlets, all are written as
a class.
A Java application program has a main method, and is
run as an independent(standalone) process.
An applet does not have a main method, and is run
using a browser or the appletviewer.
A servlet does not have a main method, and is run in the
context of a web server.
A Java program is compiled into bytecode, a
universal object code. When run, the bytecode is
interpreted by the Java Virtual Machine (JVM).
Three Types of Java programs
Applications
a program whose byte code can be run on any system
which has a Java Virtual Machine. An application may
be standalone (monolithic) or distributed (if it interacts
with another process).
Applets
A program whose byte code is downloaded from a
remote machine and is run in the browser’s Java Virtual
Machine.
Servlets
A program whose byte code resides on a remote
machine and is run at the request of an HTTP client (a
browser).
Three Types of Java programs
c o m p u t e r
J a v a o b j e c t
J a v a V i r t u a l M a c h i n e
A s t a n d a l o n e J a v a a p p l i c a t i o n i s r u n o n a l o c a l m a c h i n e
J a v a o b je c t
J a v a V i r t u a l M a c h i n e
A n a p p l e t i s a n o b j e c t d o w n l o a d e d ( t r a n s f e r r e d ) f r o m a r e m o t e m a c h i n e ,
t h e n r u n o n a l o c a l m a c h i n e .
r e q u e s t
r e s p o n s e
a s e r v l e t
a n a p p l e t
A s e r v l e t i s a n o b je c t t h a t r u n s o n a r e m o t e m a c h i n e a n d
i n t e r a c t s w i t h a l o c a l p r o g r a m u s i n g a r e q u e s t - r e s p o n s e p r o t o c o l
a p r o c e s s
A sample Java application
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* A s a m p l e o f a s i m p l e J a v a a p p l i c a t i o n .
* M . L i u 1 / 8 / 0 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
i m p o r t ja v a . i o . * ;
c l a s s M y P r o g r a m {
p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s )
t h r o w s I O E x c e p t i o n {
B u f f e r e d R e a d e r k e y b o a r d = n e w
B u f f e r e d R e a d e r ( n e w I n p u t S t r e a m R e a d e r ( S y s t e m . i n ) ) ;
S t r i n g t h e N a m e ;
S y s t e m . o u t . p r i n t l n ( " W h a t i s y o u r n a m e ? " ) ;
t h e N a m e = k e y b o a r d . r e a d L i n e ( ) ;
S y s t e m . o u t . p r i n t ( " H e l l o " + t h e N a m e ) ;
S y s t e m . o u t . p r i n t l n ( " - w e l c o m e t o C S C 3 6 9 .  n " ) ;
} / / e n d m a i n
} / / e n d c l a s s
A Sample Java Applet
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* A s a m p l e o f a s i m p l e a p p l e t .
* M . L i u 1 / 8 / 0 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
i m p o r t ja v a . a p p l e t . A p p l e t ;
i m p o r t ja v a . a w t . * ;
p u b l i c c l a s s M y A p p l e t e x t e n d s A p p l e t {
p u b l i c v o i d p a i n t ( G r a p h i c s g ) {
s e t B a c k g r o u n d ( C o l o r . b l u e ) ;
F o n t C l a u d e = n e w F o n t ( " A r i a l " , F o n t . B O L D , 4 0 ) ;
g . s e t F o n t ( C l a u d e ) ;
g . s e t C o l o r ( C o l o r . y e l l o w ) ;
g . d r a w S t r i n g ( " H e l l o W o r l d !" , 1 0 0 , 1 0 0 ) ;
} / / e n d p a i n t
} / / e n d c l a s s
< !- - A w e b p a g e w h i c h , w h e n b r o w s e d , w i l l r u n >
< !- - t h e M y A p p l e t a p p l e t >
< !- - M . L i u 1 / 8 / 0 2 >
< t i t l e > S a m p l e A p p l e t < / t i t l e >
< h r >
< a p p l e t c o d e = " M y A p p l e t . c l a s s " w i d t h = 5 0 0 h e i g h t = 5 0 0 >
< / a p p l e t >
< h r >
< a h r e f = " H e l l o . ja v a " > T h e s o u r c e . < / a >
A Sample Java Servlet
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* A s a m p l e o f a s i m p l e J a v a s e r v l e t .
* M . L i u 1 / 8 / 0 2
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
i m p o r t j a v a . i o . * ;
i m p o r t j a v a . t e x t . * ;
i m p o r t j a v a . u t i l . * ;
i m p o r t j a v a x . s e r v l e t . * ;
i m p o r t j a v a x . s e r v l e t . h t t p . * ;
p u b l i c c l a s s M y S e r v l e t e x t e n d s H t t p S e r v l e t {
p u b l i c v o i d d o G e t ( H t t p S e r v l e t R e q u e s t r e q u e s t ,
H t t p S e r v l e t R e s p o n s e r e s p o n s e )
t h r o w s S e r v l e t E x c e p t i o n , I O E x c e p t i o n {
P r i n t W r i t e r o u t ;
S t r i n g t i t l e = " M y S e r v l e t O u t p u t " ;
/ / s e t c o n t e n t t y p e a n d o t h e r r e s p o n s e h e a d e r
/ / f i e l d s f i r s t
r e s p o n s e . s e t C o n t e n t T y p e ( " t e x t / h t m l " ) ;
/ / t h e n w r i t e t h e d a t a o f t h e r e s p o n s e
o u t = r e s p o n s e . g e t W r i t e r ( ) ;
o u t . p r i n t l n ( " < H T M L > < H E A D > < T I T L E > " ) ;
o u t . p r i n t l n ( t i t l e ) ;
o u t . p r i n t l n ( " < / T I T L E > < / H E A D > < B O D Y > " ) ;
o u t . p r i n t l n ( " < H 1 > " + t i t l e + " < / H 1 > " ) ;
o u t . p r i n t l n ( " < P > H e l l o W o r l d !" ) ;
o u t . p r i n t l n ( " < / B O D Y > < / H T M L > " ) ;
o u t . c l o s e ( ) ;
} / / e n d d o G e t
} / / e n d c l a s s
Concurrent Processing
On modern day operating systems, multiple
processes appear to be executing concurrently
on a machine by timesharing resources.
P r o c e s s e s
t im e
P 1
P 2
P 3
P 4
T im e s h a r in g o f a r e s o u r c e
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.
p a r e n t p r o c e s s
c h ild p r o c e s s e s
A p a r e n t p r o c e s s m a y s p a w n c h i l d p r o c e s s e s .
a p r o c e s s
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
A p r o c e s s m a y s p a w n c h i l d t h r e a d s
C o n c u r r e n t p r o c e s s i n g w i t h i n a p r o c e s s
Java threads
The Java Virtual Machine allows an application to have multiple
threads of execution running concurrently.
Java provides a Thread class:
public class Thread
extends Object
implements Runnable
When a Java Virtual Machine starts up, there is usually a single
thread (which typically calls the method named main of some
designated class). The Java Virtual Machine continues to
execute threads until either of the following occurs:
The exit method of class Runtime has been called and the security
manager has permitted the exit operation to take place.
All threads have terminated, either by returning from the call to the
run method or by throwing an exception that propagates beyond
the run method.
Using a subclass of the Thread class
Using a class that implements the Runnable interface
Create a class that is a subclass of the Thread class
i m p o r t S o m e T h r e a d ;
p u b l i c c l a s s R u n T h r e a d s
{
p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s )
{
S o m e T h r e a d p 1 = n e w S o m e T h r e a d ( 1 ) ;
p 1 . s t a r t ( ) ;
S o m e T h r e a d p 2 = n e w S o m e T h r e a d ( 2 ) ;
p 2 . s t a r t ( ) ;
S o m e T h r e a d p 3 = n e w S o m e T h r e a d ( 3 ) ;
p 3 . s t a r t ( ) ;
}
} / / e n d c l a s s R u n T h r e a d s
p u b l i c c l a s s S o m e T h r e a d e x t e n d s T h r e a d {
i n t m y I D ;
S o m e T h r e a d ( i n t i d ) {
t h i s . m y I D = i d ;
}
p u b l i c v o i d r u n ( ) {
i n t i ;
f o r ( i = 1 ; i < 1 1 ; i + + )
S y s t e m . o u t . p r i n t l n ( " T h r e a d " + m y I D + " : " + i ) ;
}
} / / e n d c l a s s S o m e T h r e a d
Declare a class to be a subclass of
Thread. This subclass should
override the run method of class
Thread. An instance of the subclass
can then be allocated and started:
Create a class that implements the Runnable interface
p u b l i c c l a s s R u n T h r e a d s 2
{
p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s )
{
T h r e a d p 1 = n e w T h r e a d ( n e w S o m e T h r e a d 2 ( 1 ) ) ;
p 1 . s t a r t ( ) ;
T h r e a d p 2 = n e w T h r e a d ( n e w S o m e T h r e a d 2 ( 2 ) ) ;
p 2 . s t a r t ( ) ;
T h r e a d p 3 = n e w T h r e a d ( n e w S o m e T h r e a d 2 ( 3 ) ) ;
p 3 . s t a r t ( ) ;
}
}
c l a s s S o m e T h r e a d 2 i m p l e m e n t s R u n n a b l e {
i n t m y I D ;
S o m e T h r e a d 2 ( i n t i d ) {
t h i s . m y I D = i d ;
}
p u b l i c v o i d r u n ( ) {
i n t i ;
f o r ( i = 1 ; i < 1 1 ; i + + )
S y s t e m . o u t . p r i n t l n ( " T h r e a d " + m y I D + " : " + i ) ;
}
} / / e n d c l a s s S o m e T h r e a d
The other way to create a thread is to declare a class that
implements the Runnable interface. That class then
implements the run method. An instance of the class can
then be allocated, passed as an argument when creating
Thread, and started.
Thread-safe Programming
When two threads independently access and
update the same data object, such as a
counter, as part of their code, the updating
needs to be synchronized. (See next slide.)
Because the threads are executed concurrently,
it is possible for one of the updates to be
overwritten by the other due to the sequencing
of the two sets of machine instructions
executed on behalf of the two threads.
To protect against the possibility, a
synchronized method can be used to provide
mutual exclusion.
Race Condition
fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r
in c r e m e n t v a lu e in r e g is te r
s to r e v a lu e in r e g is te r to c o u n te r
tim e
fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r
in c r e m e n t v a lu e in r e g is te r
s to r e v a lu e in re g is te r to c o u n te r
in s tr u c tio n e x e c u te d in c o n c u r r e n t p r o c e s s o r th r e a d 1
in s t r u c t io n e x e c u te d in c o n c u r r e n t p r o c e s s o r th r e a d 2
T h i s e x e c u t i o n r e s u l t s i n t h e
v a l u e 2 i n t h e c o u n t e r
fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r
fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r
in c r e m e n t v a lu e in r e g is te r
in c r e m e n t v a lu e in r e g is te 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
T h i s e x e c u t i o n r e s u l t s i n t h e
v a l u e 1 i n t h e c o u n t e r
Synchronized method in a thread
c l a s s S o m e T h r e a d 3 i m p l e m e n t s R u n n a b l e {
s t a t i c i n t c o u n t = 0 ;
S o m e T h r e a d 3 ( ) {
s u p e r ( ) ;
}
p u b l i c v o i d r u n ( ) {
u p d a t e ( ) ;
}
s t a t i c p u b l i c s y n c h r o n i z e d v o i d u p d a t e ( ) {
i n t m y C o u n t = c o u n t ;
m y C o u n t + + ;
c o u n t = m y C o u n t ;
S y s t e m . o u t . p r i n t l n ( " c o u n t = " + c o u n t +
" ; t h r e a d c o u n t = " + T h r e a d . a c t i v e C o u n t ( ) ) ;
}
}
Network Basics
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Network resources
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Network resources are resources available to
the participants of a distributed computing
community.
Network resources include hardware such as
computers and equipment, and software such
as processes, email mailboxes, files, web
documents.
An important class of network resources is
network services such as the World Wide Web
and file transfer (FTP), which are provided by
specific processes running on computers.
Network standards and protocols
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
On public networks such as the Internet, it is
necessary for a common set of rules to be
specified for the exchange of data.
Such rules, called protocols, specify such
matters as the formatting and semantics of
data, flow control, error correction.
Software can share data over the network using
network software which supports a common set
of protocols.
Protocols
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
 In the context of communications, a protocol is a set of
rules that must be observed by the participants.
 In communications involving computers, protocols must
be formally defined and precisely implemented. For
each protocol, there must be rules that specify the
followings:
 How is the data exchanged encoded?
 How are events (sending , receiving) synchronized
so that the participants can send and receive in a
coordinated order?
 The specification of a protocol does not dictate how the
rules are to be implemented.
The network architecture
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Network hardware transfers electronic
signals,which represent a bit stream, between two
devices.
Modern day network applications require an
application programming interface (API) which
masks the underlying complexities of data
transmission.
A layered network architecture allows the
functionalities needed to mask the complexities to
be provided incrementally, layer by layer.
Actual implementation of the functionalities may
not be clearly divided by layer.
Protocol layers in the ISO Open Systems Interconnection (OSI) model
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Application
Presentation
Session
Transport
Network
Data link
Physical
Message sent Message received
Sender Recipient
Layers
Communication
medium
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
OSI protocol summary
Layer Description Examples
Application Protocols that are designed to meet the communication requirements of
specific applications, often defining the interface to a service.
HTTP,FTP, SMTP,
CORBA IIOP
Presentation Protocols at this level transmit data in a network representation that is
independent of the representations used in individual computers, which may
differ. Encryption is also performed in this layer, if required.
Secure Sockets
(SSL),CORBA Data
Rep.
Session At this level reliability and adaptation are performed, such as detection of
failures and automatic recovery.
Transport This is the lowest level at which messages (rather than packets) are handled.
Messages are addressed to communication ports attached to processes,
Protocols in this layer may be connection-oriented or connectionless.
TCP,UDP
Network Transfers data packets between computers in a specific network. In a WAN
or an internetwork this involves the generation of a route passing through
routers. In a single LAN no routing is required.
IP, ATM virtual
circuits
Data link Responsible for transmission of packets between nodes that are directly
connected by a physical link. In a WAN transmission is between pairs of
routers or between routers and hosts. In a LAN it is between any pair of hosts.
Ethernet MAC,
ATM cell transfer,
PPP
Physical The circuits and hardware that drive the network. It transmits sequences of
binary data by analogue signalling, using amplitude or frequency modulation
of electrical signals (on cable circuits), light signals (on fibre optic circuits)
or other electromagnetic signals (on radio and microwave circuits).
Ethernet base- band
signalling, ISDN
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 3.12
TCP/IP layers
Messages (UDP) or Streams (TCP)
Application
Transport
Internet
UDP or TCP packets
IP datagrams
Network-specific frames
Message
Layers
Underlying network
Network interface
The Transmission Control Protocol/Internet Protocol suite is a set of
network protocols which supports a four-layer network
architecture.
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.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 3.14
The programmer's conceptual view of a TCP/IP Internet
IP
Application Application
TCP UDP
Socket programming in UDP and
TCP.
Identification of Network Resources
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
One of the key challenges in distributed
computing is the unique identification of
resources available on the network, such as e-
mail mailboxes, and web documents.
Addressing an Internet Host
Addressing a process running on a host
Email Addresses
Addressing web contents: URL
The Internet Topology
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
The internet consists of an hierarchy of
networks, interconnected via a network
backbone.
Each network has a unique network address.
Computers, or hosts, are connected to a
network. Each host has a unique ID within its
network.
Each process running on a host is associated
with zero or more ports. A port is a logical
entity for data transmission.
Network Basics
1. Addressing an Internet Host
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 3.15
Internet address structure, showing field sizes in bits
7 24
Class A: 0 NetworkID Host ID
14 16
Class B: 1 0 NetworkID Host ID
21 8
Class C: 1 1 0 NetworkID Host ID
28
Class D (multicast): 1 1 1 0 Multicast address
27
Class E (reserved): 1 1 1 1 unused0
Internet routing scheme developed in the 1970s. Class A addresses are the
largest, but there are few of them. Class Cs are the smallest, but they are
numerous. Classes D and E are also defined, but not used in normal
operation.
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Figure 3.16
Decimal representation of Internet addresses
octet 1 octet 2 octet 3
Class A: 1 to 126
(0, 127
reserved)
0 to 255 0 to 255 1 to 254
Class B: 128 to 191
Class C: 192 to 223
224 to 239Class D (multicast):
Network ID
Network ID
Network ID
Host ID
Host ID
Host ID
Multicast address
0 to 255 0 to 255 1 to 254
0 to 255 0 to 255 0 to 255
0 to 255 0 to 255 0 to 255
Multicast address
0 to 255 0 to 255 1 to 254240 to 255Class E (reserved):
1.0.0.0 to
126.255.255.255
128.0.0.0 to
191.255.255.255
192.0.0.0 to
223.255.255.255
224.0.0.0 to
239.255.255.255
240.0.0.0 to
255.255.255.255
Range of addresses
The Internet addressing scheme
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
1 0 n e t w o r k a d d r e s s h o s t p o r t io n
b y t e 0 b y t e 1 b y t e 2 b y t e 3
c l a s s B a d d r e s s
s u b n e t a d d r e s s lo c a l h o s t a d d r e s s
S u b d i v i d i n g t h e h o s t p o r t i o n o f a n I n t e r n e t a d d r e s s :
A c l a s s A / C a d d r e s s s p a c e c a n
a l s o b e s i m i l a r l y s u b d i v i d e d ..
W h i c h p o r t i o n o f t h e h o s t a d d r e s s
i s u s e d f o r t h e s u b n e t i d e n t i f i c a t i o n
i s d e t e r m i n e d b y a s u b n e t m a s k .
Example
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Example:
Suppose the dotted-decimal notation for a particular Internet address
is129.65.24.50. The 32-bit binary expansion of the notation is as
follows:
Since the leading bit sequence is 10, the address is a Class B
address. Within the class, the network portion is identified by the
remaining bits in the first two bytes, that is, 1000000101000001,
and the host portion is the values in the last two bytes, or
0001100000110010. so that we would say that this particular
address is at network 129.65 and then at host address 24.50 on
that network.
1 2 9 . 6 5 . 2 4 . 5 0
1 0 0 0 0 0 0 1
0 1 0 0 0 0 0 1
0 0 0 1 1 0 0 0
0 0 1 1 0 0 1 0
The Internet Address Scheme
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
For human readability, Internet addresses are
written in a dotted decimal notation:
nnn.nnn.nnn.nnn, where each nnn group is a decimal
value in the range of 0 through 255
# Internet host table (found in /etc/hosts file)
127.0.0.1 localhost
129.65.242.5 falcon.csc.calpoly.edu falcon loghost
129.65.241.9 falcon-srv.csc.calpoly.edu falcon-srv
129.65.242.4 hornet.csc.calpoly.edu hornet
129.65.241.8 hornet-srv.csc.calpoly.edu hornet-srv
129.65.54.9 onion.csc.calpoly.edu onion
129.65.241.3 hercules.csc.calpoly.edu hercules
The Domain Name System (DNS)
For user friendliness, each Internet address is
mapped to a symbolic name, using the DNS, in the
format of:
<computer-name>.<subdomain hierarchy>.<organization>.<sector name>{.<country code>}
e.g., www.csc.calpoly.edu.us
05/13/14 54
r o o t
c o m
e d u g o v n e t o r g m i l
o r g a n i z a t i o n
...
...
h o s t n a m e
t o p - l e v e l d o m a i n
s u b d o m a i n
i n t h e U . S .
T o p - l e v e l d o m a i n n a m e h a s t o b e a p p l i e d f o r .
S u b d o m a i n h i e r a c h y a n d n a m e s a r e a s s i g n e d
b y t h e o r g a n i z a t i o n .
c o u n t r y c o d e
The Domain Name System
For network applications, a domain name
must be mapped to its corresponding Internet
address.
Processes known as domain name system
servers provide the mapping service, based
on a distributed database of the mapping
scheme.
The mapping service is offered by thousands
of DNS servers on the Internet, each
responsible for a portion of the name space,
called a zone. The servers that have access
to the DNS information (zone file) for a zone is
said to have authority for that zone.
Top-level Domain Names
.com: For commercial entities, which anyone, anywhere in the
world, can register.
.net : Originally designated for organizations directly involved
in Internet operations. It is increasingly being used by
businesses when the desired name under "com" is already
registered by another organization. Today anyone can register
a name in the Net domain.
.org: For miscellaneous organizations, including non-profits.
.edu: For four-year accredited institutions of higher learning.
.gov: For US Federal Government entities
.mil: For US military
Country Codes :For individual countries based on the
International Standards Organization. For example, ca for
Canada, and jp for Japan.
Example
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Another example:
Given the address 224.0.0.1, one can expand it as
follows:
The binary prefix of 1110 signifies that this is class D, or
multicast, address. Data packets sent to this
address should therefore be delivered to the
multicast group 0000000000000000000000000001.
2 2 4 . 0 . 0 . 1
1 1 1 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
Network Basics
2. Addressing a process running on a host
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Addressing a process running on a host
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
...
p r o c e s s
p o r t
...h o s t A
h o s t B
T h e I n t e r n e t
E a c h h o s t h a s 6 5 5 3 6 p o r t s .
Well Known Ports
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Each Internet host has 216
(65,535) logical ports.
Each port is identified by a number between 1
and 65535, and can be allocated to a particular
process.
Port numbers beween 1 and 1023 are reserved
for processes which provide well-known services
such as finger, FTP, HTTP, and email.
Well Known Ports
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
P r o t o c o l P o r t S e r v ic e
e c h o 7 IP C te s tin g
d a y tim e 1 3 p r o v id e s th e c u r r e n t d a te a n d tim e
ftp 2 1 file tr a n s fe r p r o to c o l
te ln e t 2 3 r e m o te , c o m m a n d - lin e te r m in a l s e s s io n
s m tp 2 5 s im p le m a il tr a n s fe r p r o to c o l
tim e 3 7 p r o v id e s a s ta n d a r d tim e
fin g e r 7 9 p r o v id e s in fo r m a tio n a b o u t a u s e r
h ttp 8 0 w e b s e r v e r
R M I R e g is tr y 1 0 9 9 re g is tr y fo r R e m o te M e th o d In v o c a tio n
s p e c ia l w e b s e r v e r 8 0 8 0
w e b s e r v e r w h ic h s u p p o r ts
s e r v le ts , J S P , o r A S P
A s s ig n m e n t o f s o m e w e ll- k n o w n p o r t s
Choose a port
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
For our programming exercises: when a port is
needed, choose a random number above the
well known ports: 1,024- 65,535.
If you are providing a network service for the
community, then arrange to have a port
assigned to and reserved for your service.
Network Basics
3. Addressing a Web
Document
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
The Uniform Resource Identifier (URI)
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
Resources to be shared on a network need to be
uniquely identifiable.
On the Internet, a URI is a character string which allows
a resource to be located.
There are two types of URIs:
URL (Uniform Resource Locator) points to a specific resource
at a specific location
URN (Uniform Resource Name) points to a specific resource at
a nonspecific location.
“A URN is like a person's name, while a URL is like their street
address. The URN defines something's identity, while the URL
provides a method for finding something. Essentially, "what" vs.
"where".” (from Wiki)
URL
Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4
© Pearson Education 2005
A URL has the format of:
protocol://host address[:port]/directory path/file name#section
A s a m p l e U R L :
h t t p :/ / w w w . c s c . c a lp o ly . e d u :8 0 8 0 / ~ m liu / C S C 3 6 9 / h w . h t m l # h w 1
p r o t o c o l o f s e r v e r
h o s t n a m e
p o r t n u m b e r o f s e r v e r p r o c e s s
d ir e c t o r y p a t h
f ile n a m e
s e c t io n n a m e
O t h e r p r o t o c o l s t h a t c a n a p p e a r i n a U R L a r e :
f i l e
f t p
g o p h e r
n e w s
t e l n e t
W A I S

Más contenido relacionado

La actualidad más candente

Distributed System
Distributed SystemDistributed System
Distributed SystemIqra khalil
 
Distributed Systems - Information Technology
Distributed Systems - Information TechnologyDistributed Systems - Information Technology
Distributed Systems - Information TechnologySagar Mehta
 
Intro (Distributed computing)
Intro (Distributed computing)Intro (Distributed computing)
Intro (Distributed computing)Sri Prasanna
 
Distributed computing
Distributed computingDistributed computing
Distributed computingKeshab Nath
 
Chapter 1-distribute Computing
Chapter 1-distribute ComputingChapter 1-distribute Computing
Chapter 1-distribute Computingnakomuri
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systemsvampugani
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed SystemsRupsee
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architectureYisal Khan
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed SystemRKGhosh3
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systemscfenoy
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating systemudaya khanal
 
Distributed computing environment
Distributed computing environmentDistributed computing environment
Distributed computing environmentRavi Bhushan
 
Distributed computing
Distributed computingDistributed computing
Distributed computingshivli0769
 
Distributed Computing Report
Distributed Computing ReportDistributed Computing Report
Distributed Computing ReportIIT Kharagpur
 
Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance SHIKHA GAUTAM
 

La actualidad más candente (20)

Distributed System
Distributed SystemDistributed System
Distributed System
 
Distributed Systems - Information Technology
Distributed Systems - Information TechnologyDistributed Systems - Information Technology
Distributed Systems - Information Technology
 
Trends in distributed systems
Trends in distributed systemsTrends in distributed systems
Trends in distributed systems
 
Intro (Distributed computing)
Intro (Distributed computing)Intro (Distributed computing)
Intro (Distributed computing)
 
Unit 1
Unit 1Unit 1
Unit 1
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
istributed system
istributed systemistributed system
istributed system
 
Chapter 1 slides
Chapter 1 slidesChapter 1 slides
Chapter 1 slides
 
Chapter 1-distribute Computing
Chapter 1-distribute ComputingChapter 1-distribute Computing
Chapter 1-distribute Computing
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
 
Introduction to Distributed System
Introduction to Distributed SystemIntroduction to Distributed System
Introduction to Distributed System
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Distributed system
Distributed systemDistributed system
Distributed system
 
Distributed operating system
Distributed operating systemDistributed operating system
Distributed operating system
 
Distributed computing environment
Distributed computing environmentDistributed computing environment
Distributed computing environment
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Distributed Computing Report
Distributed Computing ReportDistributed Computing Report
Distributed Computing Report
 
Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance
 

Destacado

Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed ComputingAbhishek Jaisingh
 
Lecture 1 (distributed systems)
Lecture 1 (distributed systems)Lecture 1 (distributed systems)
Lecture 1 (distributed systems)Fazli Amin
 
Google: Cluster computing and MapReduce: Introduction to Distributed System D...
Google: Cluster computing and MapReduce: Introduction to Distributed System D...Google: Cluster computing and MapReduce: Introduction to Distributed System D...
Google: Cluster computing and MapReduce: Introduction to Distributed System D...tugrulh
 
Chapter 3 slides
Chapter 3 slidesChapter 3 slides
Chapter 3 slideslara_ays
 
Chapter 9 slides
Chapter 9 slidesChapter 9 slides
Chapter 9 slideslara_ays
 
Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)soe sumijan
 
Chapter 6 slides
Chapter 6 slidesChapter 6 slides
Chapter 6 slideslara_ays
 
Chapter 5 slides
Chapter 5 slidesChapter 5 slides
Chapter 5 slideslara_ays
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system modelHarshad Umredkar
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)Dinesh Modak
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systemsAbDul ThaYyal
 
Distributed computing ).ppt him
Distributed computing ).ppt himDistributed computing ).ppt him
Distributed computing ).ppt himHimanshu Saini
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communicationAbDul ThaYyal
 
What Makes Great Infographics
What Makes Great InfographicsWhat Makes Great Infographics
What Makes Great InfographicsSlideShare
 
Masters of SlideShare
Masters of SlideShareMasters of SlideShare
Masters of SlideShareKapost
 
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to SlideshareSTOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to SlideshareEmpowered Presentations
 

Destacado (20)

Client Server Model and Distributed Computing
Client Server Model and Distributed ComputingClient Server Model and Distributed Computing
Client Server Model and Distributed Computing
 
Lecture 1 (distributed systems)
Lecture 1 (distributed systems)Lecture 1 (distributed systems)
Lecture 1 (distributed systems)
 
Google: Cluster computing and MapReduce: Introduction to Distributed System D...
Google: Cluster computing and MapReduce: Introduction to Distributed System D...Google: Cluster computing and MapReduce: Introduction to Distributed System D...
Google: Cluster computing and MapReduce: Introduction to Distributed System D...
 
Aos distibutted system
Aos distibutted systemAos distibutted system
Aos distibutted system
 
Chapter 3 slides
Chapter 3 slidesChapter 3 slides
Chapter 3 slides
 
Chapter 9 slides
Chapter 9 slidesChapter 9 slides
Chapter 9 slides
 
Chapter 7 security
Chapter 7 securityChapter 7 security
Chapter 7 security
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)Chapter 3 slides (Distributed Systems)
Chapter 3 slides (Distributed Systems)
 
Chapter 6 slides
Chapter 6 slidesChapter 6 slides
Chapter 6 slides
 
Chapter 17 corba
Chapter 17 corbaChapter 17 corba
Chapter 17 corba
 
Chapter 5 slides
Chapter 5 slidesChapter 5 slides
Chapter 5 slides
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systems
 
Distributed computing ).ppt him
Distributed computing ).ppt himDistributed computing ).ppt him
Distributed computing ).ppt him
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
What Makes Great Infographics
What Makes Great InfographicsWhat Makes Great Infographics
What Makes Great Infographics
 
Masters of SlideShare
Masters of SlideShareMasters of SlideShare
Masters of SlideShare
 
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to SlideshareSTOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
 

Similar a Chapter 1

Exercises 10
Exercises 10Exercises 10
Exercises 10AhusseinA
 
cloudcomputingdistributedcomputing-171208050503 (1).pdf
cloudcomputingdistributedcomputing-171208050503 (1).pdfcloudcomputingdistributedcomputing-171208050503 (1).pdf
cloudcomputingdistributedcomputing-171208050503 (1).pdfArchanaPandiyan
 
thilaganga journal 1
thilaganga journal 1thilaganga journal 1
thilaganga journal 1thilaganga
 
Cloud Computing
Cloud Computing Cloud Computing
Cloud Computing NASIMTAHIR2
 
Cloud computing and its application in libraries
Cloud computing and its application in librariesCloud computing and its application in libraries
Cloud computing and its application in librariesNabi Hasan
 
E-Comura Documentation
E-Comura DocumentationE-Comura Documentation
E-Comura Documentationanuj_rakheja
 
The Security Of Cloud Computing
The Security Of Cloud ComputingThe Security Of Cloud Computing
The Security Of Cloud ComputingJulie May
 
Designing Distributed Systems: Google Cas Study
Designing Distributed Systems: Google Cas StudyDesigning Distributed Systems: Google Cas Study
Designing Distributed Systems: Google Cas StudyMeysam Javadi
 
Webinar CRUI Dell: flexilab, computer classroom made flexible
Webinar CRUI Dell: flexilab, computer classroom made flexible Webinar CRUI Dell: flexilab, computer classroom made flexible
Webinar CRUI Dell: flexilab, computer classroom made flexible Jürgen Ambrosi
 
Cloud Computing for Elearning
Cloud Computing for ElearningCloud Computing for Elearning
Cloud Computing for ElearningRoryMcGreal
 
Distributed systems
Distributed systemsDistributed systems
Distributed systemsRavi Yasas
 
Advantages Of Online Edu Moodle
Advantages Of Online Edu MoodleAdvantages Of Online Edu Moodle
Advantages Of Online Edu MoodleJulie Kwhl
 
Introduction to cloud computing
Introduction to cloud computingIntroduction to cloud computing
Introduction to cloud computingvishnu varunan
 
PPT_CLOUD COMPUTING_UNIT 1.pptx.pdf
PPT_CLOUD COMPUTING_UNIT 1.pptx.pdfPPT_CLOUD COMPUTING_UNIT 1.pptx.pdf
PPT_CLOUD COMPUTING_UNIT 1.pptx.pdfVineet446350
 
Introduction to aneka cloud
Introduction to aneka cloudIntroduction to aneka cloud
Introduction to aneka cloudssuser84183f
 

Similar a Chapter 1 (20)

20CS2021 DISTRIBUTED COMPUTING
20CS2021 DISTRIBUTED COMPUTING20CS2021 DISTRIBUTED COMPUTING
20CS2021 DISTRIBUTED COMPUTING
 
1.ppt
1.ppt1.ppt
1.ppt
 
18CS3040 DISTRIBUTED SYSTEMS
18CS3040 DISTRIBUTED SYSTEMS18CS3040 DISTRIBUTED SYSTEMS
18CS3040 DISTRIBUTED SYSTEMS
 
Exercises 10
Exercises 10Exercises 10
Exercises 10
 
cloudcomputingdistributedcomputing-171208050503 (1).pdf
cloudcomputingdistributedcomputing-171208050503 (1).pdfcloudcomputingdistributedcomputing-171208050503 (1).pdf
cloudcomputingdistributedcomputing-171208050503 (1).pdf
 
Cloud Computing & Distributed Computing
Cloud Computing & Distributed ComputingCloud Computing & Distributed Computing
Cloud Computing & Distributed Computing
 
thilaganga journal 1
thilaganga journal 1thilaganga journal 1
thilaganga journal 1
 
Cloud Computing
Cloud Computing Cloud Computing
Cloud Computing
 
Cloud computing and its application in libraries
Cloud computing and its application in librariesCloud computing and its application in libraries
Cloud computing and its application in libraries
 
E-Comura Documentation
E-Comura DocumentationE-Comura Documentation
E-Comura Documentation
 
The Security Of Cloud Computing
The Security Of Cloud ComputingThe Security Of Cloud Computing
The Security Of Cloud Computing
 
Designing Distributed Systems: Google Cas Study
Designing Distributed Systems: Google Cas StudyDesigning Distributed Systems: Google Cas Study
Designing Distributed Systems: Google Cas Study
 
Webinar CRUI Dell: flexilab, computer classroom made flexible
Webinar CRUI Dell: flexilab, computer classroom made flexible Webinar CRUI Dell: flexilab, computer classroom made flexible
Webinar CRUI Dell: flexilab, computer classroom made flexible
 
Cloud Computing for Elearning
Cloud Computing for ElearningCloud Computing for Elearning
Cloud Computing for Elearning
 
clound computing
clound computingclound computing
clound computing
 
Distributed systems
Distributed systemsDistributed systems
Distributed systems
 
Advantages Of Online Edu Moodle
Advantages Of Online Edu MoodleAdvantages Of Online Edu Moodle
Advantages Of Online Edu Moodle
 
Introduction to cloud computing
Introduction to cloud computingIntroduction to cloud computing
Introduction to cloud computing
 
PPT_CLOUD COMPUTING_UNIT 1.pptx.pdf
PPT_CLOUD COMPUTING_UNIT 1.pptx.pdfPPT_CLOUD COMPUTING_UNIT 1.pptx.pdf
PPT_CLOUD COMPUTING_UNIT 1.pptx.pdf
 
Introduction to aneka cloud
Introduction to aneka cloudIntroduction to aneka cloud
Introduction to aneka cloud
 

Más de Hassan Dar (12)

Mmclass9
Mmclass9Mmclass9
Mmclass9
 
Mmclass6
Mmclass6Mmclass6
Mmclass6
 
Mmclass5b
Mmclass5bMmclass5b
Mmclass5b
 
Mmclass5
Mmclass5Mmclass5
Mmclass5
 
Mmclass4
Mmclass4Mmclass4
Mmclass4
 
Mmclass3
Mmclass3Mmclass3
Mmclass3
 
Mmclass2
Mmclass2Mmclass2
Mmclass2
 
Mmclass1
Mmclass1Mmclass1
Mmclass1
 
Lecture1
Lecture1Lecture1
Lecture1
 
Ch4
Ch4Ch4
Ch4
 
Msd ch2 issues in multimedia
Msd ch2 issues in multimediaMsd ch2 issues in multimedia
Msd ch2 issues in multimedia
 
Mmclass10
Mmclass10Mmclass10
Mmclass10
 

Último

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Último (20)

MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 

Chapter 1

  • 1. Slides for Chapter 1 Introduction to Distributed System and Computing From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005 Reference slides from Distributed Computing Introduction, M. Liu And Java programming, D. Liang
  • 2. Distributed system, distributed computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Early computing was performed on a single processor. Uni-processor computing can be called centralized computing. A distributed system is a collection of independent computers, interconnected via a network, capable of collaborating on a task by message passing. It has three features: Concurrency No global clock Independent failure Distributed computing is computing performed in a distributed system.
  • 3. Examples of Distributed Systems Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Web Search: major growth industry in the last decade. 10 billion per month for global number of searches. Complex task for searching a big database with 63 billion pages. (e.g. Google distributed infrastructure, file system, storage, lock service, parallel computing) Massively multiplayer online games: Large number of people interact through the Internet with a virtual world. Challenges include fast response time, real-time propagation of events. Financial trading: provides real-time access to a wide range of information sources such as current share prices and trends, economic and political development news. Challenges include how to deliver events reliably and in a timely manner to very large numbers of clients.
  • 4. Trend in Distributed Systems Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Pervasive networking and modern Internet: Wifi, WiMax, Bluetooth, the third- generation of mobile phone networks. The result is that networking has become a pervasive resource and devices can be connected at any time and in any place. Mobile and ubiquitous computing: small and portable computing devices are integrated into the distributed system such as laptop, handheld devices( PDA, cell phone, camera etc). Distributed multimedia systems: it support a range of media types such as audio, video in a distributed system. So desktop can access live television, file libraries, music libraries, telephone IP phone (Skype) in distributed system. QoS issue Distributed Computing as a utility: A number of companies provide the computing, storage and application resources as a commodity or utility to users. So users do not need to maintain local IT. Pay as use. Analogy between distributed resources and other utilities such a water or electricity.
  • 5. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 intranet ISP desktop computer: backbone satellite link server: network link: Figure 1.1 A typical portion of the Internet
  • 6. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 1.2 A typical intranet the rest of email server Web server Desktop computers File server router/firewall print and other servers other servers print Local area network email server the Internet
  • 7. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 1.3 Portable and handheld devices in a distributed system Laptop Mobile Printer Camera Internet Host intranet Home intranet WAP Wireless LAN phone gateway Host site
  • 8. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 1.4 Web servers and web browsers Internet BrowsersWeb servers www.google.com www.cdk3.net www.w3c.org Protocols Activity.html http://www.w3c.org/Protocols/Activity.html http://www.google.comlsearch?q=kindberg http://www.cdk3.net/ File system of www.w3c.org
  • 9. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 1.5 Computers in the Internet Date Computers Web servers 1979, Dec. 188 0 1989, July 130,000 0 1999, July 56,218,000 5,560,866 2003, Jan. 171,638,297 35,424,956
  • 10. Centralized vs. Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 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 h o s t n e t w o r k lin k t e r m in a l c e n t r a l i z e d c o m p u t i n g d i s t r i b u t e d c o m p u t i n g
  • 11. Evolution of paradigms Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Client-server: Socket API, remote method invocation Distributed objects Object broker: CORBA Network service: Jini Object space: JavaSpaces Mobile agents Message oriented middleware (MOM): Java Message Service Collaborative applications
  • 12. Why distributed computing? Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Resource sharing/Economics: distributed systems allow the pooling of resources, including CPU cycles, data storage, input/output devices, and services. Scalability: Increasing demands and users can be easily addressed by adding more resources and the system can still run effectively. Reliability: a distributed system allow replication of resources and/or services, thus reducing service outage due to failures. The affordability of computers and availability of network access: The Internet has become a universal platform for distributed computing.
  • 13. The Challenges of Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 The Challenges of distributed computing: Heterogeneity: computers and networks are of different types. Including hardware, network, programming language, and operating system. E.g. Two alternatives for byte ordering of integers on different hardware, namely big- endian and little-endian. Message transfer should take care of it. E.g. The different types of networks are masked by the fact that all computers attached to the Internet use the Internet protocols to communicate. E.g. Different OS may provide the different programming interface for message exchanges. Like different calls in UNIX and Windows. E.g. Different programming languages use different representations for characters and data structures. Difference must be handled if two need to communicate. E.g. Different programs written by different developers even same language may use different communication protocols and primitive data items and data structures in messages.
  • 14. The Challenges of Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Failure handling: Failures in a distributed system are partial- that is, some components fail while others continue to function. So is particularly difficult. Detecting failures: some can be detected (checksum) and some may not. Masking failures: detected and can be hidden or made less severe. a. message can be retransmitted b. file data can be save on two disks if one fails, the other one works. Tolerating failures: not possible to detect all and hide all. Just report the error. Recovery from failure: software so that the state of permanent data can be recovered or rolled back after a server crash. Redundancy: redundant components. a. two routes between two routers. b. Domain name system, every name table is replicated in at least two servers. c. database may be replicated in different servers. Redirect client to other servers The design of effective techniques for keeping replicas of rapidly changing data up-to- date without excessive loss of performance is challenging.
  • 15. The Challenges of Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Concurrency: several clients may attempt to access a shared resource at the same time. For example, auction bid data structure by clients Process manages a shared resource could take one client request at a time. But that approach limits throughput. So concurrent threads are usually allowed. Smith: $122 and Jones: $111. If operations are interleaved without any control, then they might get stored as Smith: $1111 and Jones: $122 For data to be safe in a concurrent environment, its operations must be synchronized in such a way that data remains consistent such as semaphores.
  • 16. The Challenges of Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Scalability: It will remain effective when there is a significant increase in the number of resources and the number of users. Controlling the cost of physical resources: as the demand for a resource grows, it should be possible to extend the system at reasonable cost. Controlling the performance loss: Algorithm uses hierarchic structures O(logN) scale better than those use linear structures O(N). Preventing software resources running out: IP addresses start with 32 bits. New version 128 bits. Modification to software needed. Avoiding performance bottleneck: algorithm should be decentralized to avoid having performance bottleneck.
  • 17. The Challenges of Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Security Concerns: In a distributed system, there are more opportunities for unauthorized attack. Confidentiality (protecting against disclosure to unauthorized individuals); Integrity (protection against alteration or corruption); Availability (protection against interference with the means to access the resource);
  • 18. The Challenges of Distributed Computing Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Transparency: It is a major influence on the design of the distributed system software Defined as the concealment from the user and the application programmer of the separation of components in a distributed system, so that the system is perceived as a whole rather than a collection of independent component.
  • 19. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Transparencies Access transparency: enables local and remote resources to be accessed using identical operations. Location transparency: enables resources to be accessed without knowledge of their physical or network location (for example, which building or IP address). Concurrency transparency: enables several processes to operate concurrently using shared resources without interference between them. Replication transparency: enables multiple instances of resources to be used to increase reliability and performance without knowledge of the replicas by users or application programmers. Failure transparency: enables the concealment of faults, allowing users and application programs to complete their tasks despite the failure of hardware or software components. Mobility transparency: allows the movement of resources and clients within a system without affecting the operation of users or programs. Performance transparency: allows the system to be reconfigured to improve performance as loads vary. Scaling transparency: allows the system and applications to expand in scale without change to the system structure or the application algorithms.
  • 20. Operating Systems Basics Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
  • 21. Process and program Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 A process consists of an executing program, its current values, state information, and the resources used by the operating system to manage its execution. A program is an artifact constructed by a software developer; a process is a dynamic entity which exists only when a program is run.
  • 22. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Process State Transition Diagram S i m p l i f e d f i n i t e s t a t e d i a g r a m f o r a p r o c e s s ' s l i f e t i m e s t a r t r e a d y r u n n i n g b l o c k e d t e r m i n a t e d d is p a t c h q u e u e d e v e n t c o m p le t io n w a it in g f o r e v e n t e x it
  • 23. Java processes There are three types of Java program: applications, applets, and servlets, all are written as a class. A Java application program has a main method, and is run as an independent(standalone) process. An applet does not have a main method, and is run using a browser or the appletviewer. A servlet does not have a main method, and is run in the context of a web server. A Java program is compiled into bytecode, a universal object code. When run, the bytecode is interpreted by the Java Virtual Machine (JVM).
  • 24. Three Types of Java programs Applications a program whose byte code can be run on any system which has a Java Virtual Machine. An application may be standalone (monolithic) or distributed (if it interacts with another process). Applets A program whose byte code is downloaded from a remote machine and is run in the browser’s Java Virtual Machine. Servlets A program whose byte code resides on a remote machine and is run at the request of an HTTP client (a browser).
  • 25. Three Types of Java programs c o m p u t e r J a v a o b j e c t J a v a V i r t u a l M a c h i n e A s t a n d a l o n e J a v a a p p l i c a t i o n i s r u n o n a l o c a l m a c h i n e J a v a o b je c t J a v a V i r t u a l M a c h i n e A n a p p l e t i s a n o b j e c t d o w n l o a d e d ( t r a n s f e r r e d ) f r o m a r e m o t e m a c h i n e , t h e n r u n o n a l o c a l m a c h i n e . r e q u e s t r e s p o n s e a s e r v l e t a n a p p l e t A s e r v l e t i s a n o b je c t t h a t r u n s o n a r e m o t e m a c h i n e a n d i n t e r a c t s w i t h a l o c a l p r o g r a m u s i n g a r e q u e s t - r e s p o n s e p r o t o c o l a p r o c e s s
  • 26. A sample Java application / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A s a m p l e o f a s i m p l e J a v a a p p l i c a t i o n . * M . L i u 1 / 8 / 0 2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / i m p o r t ja v a . i o . * ; c l a s s M y P r o g r a m { p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s ) t h r o w s I O E x c e p t i o n { B u f f e r e d R e a d e r k e y b o a r d = n e w B u f f e r e d R e a d e r ( n e w I n p u t S t r e a m R e a d e r ( S y s t e m . i n ) ) ; S t r i n g t h e N a m e ; S y s t e m . o u t . p r i n t l n ( " W h a t i s y o u r n a m e ? " ) ; t h e N a m e = k e y b o a r d . r e a d L i n e ( ) ; S y s t e m . o u t . p r i n t ( " H e l l o " + t h e N a m e ) ; S y s t e m . o u t . p r i n t l n ( " - w e l c o m e t o C S C 3 6 9 . n " ) ; } / / e n d m a i n } / / e n d c l a s s
  • 27. A Sample Java Applet / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A s a m p l e o f a s i m p l e a p p l e t . * M . L i u 1 / 8 / 0 2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / i m p o r t ja v a . a p p l e t . A p p l e t ; i m p o r t ja v a . a w t . * ; p u b l i c c l a s s M y A p p l e t e x t e n d s A p p l e t { p u b l i c v o i d p a i n t ( G r a p h i c s g ) { s e t B a c k g r o u n d ( C o l o r . b l u e ) ; F o n t C l a u d e = n e w F o n t ( " A r i a l " , F o n t . B O L D , 4 0 ) ; g . s e t F o n t ( C l a u d e ) ; g . s e t C o l o r ( C o l o r . y e l l o w ) ; g . d r a w S t r i n g ( " H e l l o W o r l d !" , 1 0 0 , 1 0 0 ) ; } / / e n d p a i n t } / / e n d c l a s s < !- - A w e b p a g e w h i c h , w h e n b r o w s e d , w i l l r u n > < !- - t h e M y A p p l e t a p p l e t > < !- - M . L i u 1 / 8 / 0 2 > < t i t l e > S a m p l e A p p l e t < / t i t l e > < h r > < a p p l e t c o d e = " M y A p p l e t . c l a s s " w i d t h = 5 0 0 h e i g h t = 5 0 0 > < / a p p l e t > < h r > < a h r e f = " H e l l o . ja v a " > T h e s o u r c e . < / a >
  • 28. A Sample Java Servlet / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * A s a m p l e o f a s i m p l e J a v a s e r v l e t . * M . L i u 1 / 8 / 0 2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / i m p o r t j a v a . i o . * ; i m p o r t j a v a . t e x t . * ; i m p o r t j a v a . u t i l . * ; i m p o r t j a v a x . s e r v l e t . * ; i m p o r t j a v a x . s e r v l e t . h t t p . * ; p u b l i c c l a s s M y S e r v l e t e x t e n d s H t t p S e r v l e t { p u b l i c v o i d d o G e t ( H t t p S e r v l e t R e q u e s t r e q u e s t , H t t p S e r v l e t R e s p o n s e r e s p o n s e ) t h r o w s S e r v l e t E x c e p t i o n , I O E x c e p t i o n { P r i n t W r i t e r o u t ; S t r i n g t i t l e = " M y S e r v l e t O u t p u t " ; / / s e t c o n t e n t t y p e a n d o t h e r r e s p o n s e h e a d e r / / f i e l d s f i r s t r e s p o n s e . s e t C o n t e n t T y p e ( " t e x t / h t m l " ) ; / / t h e n w r i t e t h e d a t a o f t h e r e s p o n s e o u t = r e s p o n s e . g e t W r i t e r ( ) ; o u t . p r i n t l n ( " < H T M L > < H E A D > < T I T L E > " ) ; o u t . p r i n t l n ( t i t l e ) ; o u t . p r i n t l n ( " < / T I T L E > < / H E A D > < B O D Y > " ) ; o u t . p r i n t l n ( " < H 1 > " + t i t l e + " < / H 1 > " ) ; o u t . p r i n t l n ( " < P > H e l l o W o r l d !" ) ; o u t . p r i n t l n ( " < / B O D Y > < / H T M L > " ) ; o u t . c l o s e ( ) ; } / / e n d d o G e t } / / e n d c l a s s
  • 29. Concurrent Processing On modern day operating systems, multiple processes appear to be executing concurrently on a machine by timesharing resources. P r o c e s s e s t im e P 1 P 2 P 3 P 4 T im e s h a r in g o f a r e s o u r c e
  • 30. 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. p a r e n t p r o c e s s c h ild p r o c e s s e s A p a r e n t p r o c e s s m a y s p a w n c h i l d p r o c e s s e s . a p r o c e s s 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 A p r o c e s s m a y s p a w n c h i l d t h r e a d s C o n c u r r e n t p r o c e s s i n g w i t h i n a p r o c e s s
  • 31. Java threads The Java Virtual Machine allows an application to have multiple threads of execution running concurrently. Java provides a Thread class: public class Thread extends Object implements Runnable When a Java Virtual Machine starts up, there is usually a single thread (which typically calls the method named main of some designated class). The Java Virtual Machine continues to execute threads until either of the following occurs: The exit method of class Runtime has been called and the security manager has permitted the exit operation to take place. All threads have terminated, either by returning from the call to the run method or by throwing an exception that propagates beyond the run method. Using a subclass of the Thread class Using a class that implements the Runnable interface
  • 32. Create a class that is a subclass of the Thread class i m p o r t S o m e T h r e a d ; p u b l i c c l a s s R u n T h r e a d s { p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s ) { S o m e T h r e a d p 1 = n e w S o m e T h r e a d ( 1 ) ; p 1 . s t a r t ( ) ; S o m e T h r e a d p 2 = n e w S o m e T h r e a d ( 2 ) ; p 2 . s t a r t ( ) ; S o m e T h r e a d p 3 = n e w S o m e T h r e a d ( 3 ) ; p 3 . s t a r t ( ) ; } } / / e n d c l a s s R u n T h r e a d s p u b l i c c l a s s S o m e T h r e a d e x t e n d s T h r e a d { i n t m y I D ; S o m e T h r e a d ( i n t i d ) { t h i s . m y I D = i d ; } p u b l i c v o i d r u n ( ) { i n t i ; f o r ( i = 1 ; i < 1 1 ; i + + ) S y s t e m . o u t . p r i n t l n ( " T h r e a d " + m y I D + " : " + i ) ; } } / / e n d c l a s s S o m e T h r e a d Declare a class to be a subclass of Thread. This subclass should override the run method of class Thread. An instance of the subclass can then be allocated and started:
  • 33. Create a class that implements the Runnable interface p u b l i c c l a s s R u n T h r e a d s 2 { p u b l i c s t a t i c v o i d m a i n ( S t r i n g [ ] a r g s ) { T h r e a d p 1 = n e w T h r e a d ( n e w S o m e T h r e a d 2 ( 1 ) ) ; p 1 . s t a r t ( ) ; T h r e a d p 2 = n e w T h r e a d ( n e w S o m e T h r e a d 2 ( 2 ) ) ; p 2 . s t a r t ( ) ; T h r e a d p 3 = n e w T h r e a d ( n e w S o m e T h r e a d 2 ( 3 ) ) ; p 3 . s t a r t ( ) ; } } c l a s s S o m e T h r e a d 2 i m p l e m e n t s R u n n a b l e { i n t m y I D ; S o m e T h r e a d 2 ( i n t i d ) { t h i s . m y I D = i d ; } p u b l i c v o i d r u n ( ) { i n t i ; f o r ( i = 1 ; i < 1 1 ; i + + ) S y s t e m . o u t . p r i n t l n ( " T h r e a d " + m y I D + " : " + i ) ; } } / / e n d c l a s s S o m e T h r e a d The other way to create a thread is to declare a class that implements the Runnable interface. That class then implements the run method. An instance of the class can then be allocated, passed as an argument when creating Thread, and started.
  • 34. Thread-safe Programming When two threads independently access and update the same data object, such as a counter, as part of their code, the updating needs to be synchronized. (See next slide.) Because the threads are executed concurrently, it is possible for one of the updates to be overwritten by the other due to the sequencing of the two sets of machine instructions executed on behalf of the two threads. To protect against the possibility, a synchronized method can be used to provide mutual exclusion.
  • 35. Race Condition fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r in c r e m e n t v a lu e in r e g is te r s to r e v a lu e in r e g is te r to c o u n te r tim e fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r in c r e m e n t v a lu e in r e g is te r s to r e v a lu e in re g is te r to c o u n te r in s tr u c tio n e x e c u te d in c o n c u r r e n t p r o c e s s o r th r e a d 1 in s t r u c t io n e x e c u te d in c o n c u r r e n t p r o c e s s o r th r e a d 2 T h i s e x e c u t i o n r e s u l t s i n t h e v a l u e 2 i n t h e c o u n t e r fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r fe tc h v a lu e in c o u n te r a n d lo a d in to a r e g is te r in c r e m e n t v a lu e in r e g is te r in c r e m e n t v a lu e in r e g is te 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 T h i s e x e c u t i o n r e s u l t s i n t h e v a l u e 1 i n t h e c o u n t e r
  • 36. Synchronized method in a thread c l a s s S o m e T h r e a d 3 i m p l e m e n t s R u n n a b l e { s t a t i c i n t c o u n t = 0 ; S o m e T h r e a d 3 ( ) { s u p e r ( ) ; } p u b l i c v o i d r u n ( ) { u p d a t e ( ) ; } s t a t i c p u b l i c s y n c h r o n i z e d v o i d u p d a t e ( ) { i n t m y C o u n t = c o u n t ; m y C o u n t + + ; c o u n t = m y C o u n t ; S y s t e m . o u t . p r i n t l n ( " c o u n t = " + c o u n t + " ; t h r e a d c o u n t = " + T h r e a d . a c t i v e C o u n t ( ) ) ; } }
  • 37. Network Basics Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
  • 38. Network resources Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Network resources are resources available to the participants of a distributed computing community. Network resources include hardware such as computers and equipment, and software such as processes, email mailboxes, files, web documents. An important class of network resources is network services such as the World Wide Web and file transfer (FTP), which are provided by specific processes running on computers.
  • 39. Network standards and protocols Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 On public networks such as the Internet, it is necessary for a common set of rules to be specified for the exchange of data. Such rules, called protocols, specify such matters as the formatting and semantics of data, flow control, error correction. Software can share data over the network using network software which supports a common set of protocols.
  • 40. Protocols Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005  In the context of communications, a protocol is a set of rules that must be observed by the participants.  In communications involving computers, protocols must be formally defined and precisely implemented. For each protocol, there must be rules that specify the followings:  How is the data exchanged encoded?  How are events (sending , receiving) synchronized so that the participants can send and receive in a coordinated order?  The specification of a protocol does not dictate how the rules are to be implemented.
  • 41. The network architecture Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Network hardware transfers electronic signals,which represent a bit stream, between two devices. Modern day network applications require an application programming interface (API) which masks the underlying complexities of data transmission. A layered network architecture allows the functionalities needed to mask the complexities to be provided incrementally, layer by layer. Actual implementation of the functionalities may not be clearly divided by layer.
  • 42. Protocol layers in the ISO Open Systems Interconnection (OSI) model Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Application Presentation Session Transport Network Data link Physical Message sent Message received Sender Recipient Layers Communication medium
  • 43. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 OSI protocol summary Layer Description Examples Application Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. HTTP,FTP, SMTP, CORBA IIOP Presentation Protocols at this level transmit data in a network representation that is independent of the representations used in individual computers, which may differ. Encryption is also performed in this layer, if required. Secure Sockets (SSL),CORBA Data Rep. Session At this level reliability and adaptation are performed, such as detection of failures and automatic recovery. Transport This is the lowest level at which messages (rather than packets) are handled. Messages are addressed to communication ports attached to processes, Protocols in this layer may be connection-oriented or connectionless. TCP,UDP Network Transfers data packets between computers in a specific network. In a WAN or an internetwork this involves the generation of a route passing through routers. In a single LAN no routing is required. IP, ATM virtual circuits Data link Responsible for transmission of packets between nodes that are directly connected by a physical link. In a WAN transmission is between pairs of routers or between routers and hosts. In a LAN it is between any pair of hosts. Ethernet MAC, ATM cell transfer, PPP Physical The circuits and hardware that drive the network. It transmits sequences of binary data by analogue signalling, using amplitude or frequency modulation of electrical signals (on cable circuits), light signals (on fibre optic circuits) or other electromagnetic signals (on radio and microwave circuits). Ethernet base- band signalling, ISDN
  • 44. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 3.12 TCP/IP layers Messages (UDP) or Streams (TCP) Application Transport Internet UDP or TCP packets IP datagrams Network-specific frames Message Layers Underlying network Network interface The Transmission Control Protocol/Internet Protocol suite is a set of network protocols which supports a four-layer network architecture. 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.
  • 45. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 3.14 The programmer's conceptual view of a TCP/IP Internet IP Application Application TCP UDP Socket programming in UDP and TCP.
  • 46. Identification of Network Resources Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 One of the key challenges in distributed computing is the unique identification of resources available on the network, such as e- mail mailboxes, and web documents. Addressing an Internet Host Addressing a process running on a host Email Addresses Addressing web contents: URL
  • 47. The Internet Topology Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 The internet consists of an hierarchy of networks, interconnected via a network backbone. Each network has a unique network address. Computers, or hosts, are connected to a network. Each host has a unique ID within its network. Each process running on a host is associated with zero or more ports. A port is a logical entity for data transmission.
  • 48. Network Basics 1. Addressing an Internet Host Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
  • 49. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 3.15 Internet address structure, showing field sizes in bits 7 24 Class A: 0 NetworkID Host ID 14 16 Class B: 1 0 NetworkID Host ID 21 8 Class C: 1 1 0 NetworkID Host ID 28 Class D (multicast): 1 1 1 0 Multicast address 27 Class E (reserved): 1 1 1 1 unused0 Internet routing scheme developed in the 1970s. Class A addresses are the largest, but there are few of them. Class Cs are the smallest, but they are numerous. Classes D and E are also defined, but not used in normal operation.
  • 50. Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Figure 3.16 Decimal representation of Internet addresses octet 1 octet 2 octet 3 Class A: 1 to 126 (0, 127 reserved) 0 to 255 0 to 255 1 to 254 Class B: 128 to 191 Class C: 192 to 223 224 to 239Class D (multicast): Network ID Network ID Network ID Host ID Host ID Host ID Multicast address 0 to 255 0 to 255 1 to 254 0 to 255 0 to 255 0 to 255 0 to 255 0 to 255 0 to 255 Multicast address 0 to 255 0 to 255 1 to 254240 to 255Class E (reserved): 1.0.0.0 to 126.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 240.0.0.0 to 255.255.255.255 Range of addresses
  • 51. The Internet addressing scheme Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 1 0 n e t w o r k a d d r e s s h o s t p o r t io n b y t e 0 b y t e 1 b y t e 2 b y t e 3 c l a s s B a d d r e s s s u b n e t a d d r e s s lo c a l h o s t a d d r e s s S u b d i v i d i n g t h e h o s t p o r t i o n o f a n I n t e r n e t a d d r e s s : A c l a s s A / C a d d r e s s s p a c e c a n a l s o b e s i m i l a r l y s u b d i v i d e d .. W h i c h p o r t i o n o f t h e h o s t a d d r e s s i s u s e d f o r t h e s u b n e t i d e n t i f i c a t i o n i s d e t e r m i n e d b y a s u b n e t m a s k .
  • 52. Example Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Example: Suppose the dotted-decimal notation for a particular Internet address is129.65.24.50. The 32-bit binary expansion of the notation is as follows: Since the leading bit sequence is 10, the address is a Class B address. Within the class, the network portion is identified by the remaining bits in the first two bytes, that is, 1000000101000001, and the host portion is the values in the last two bytes, or 0001100000110010. so that we would say that this particular address is at network 129.65 and then at host address 24.50 on that network. 1 2 9 . 6 5 . 2 4 . 5 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0
  • 53. The Internet Address Scheme Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 For human readability, Internet addresses are written in a dotted decimal notation: nnn.nnn.nnn.nnn, where each nnn group is a decimal value in the range of 0 through 255 # Internet host table (found in /etc/hosts file) 127.0.0.1 localhost 129.65.242.5 falcon.csc.calpoly.edu falcon loghost 129.65.241.9 falcon-srv.csc.calpoly.edu falcon-srv 129.65.242.4 hornet.csc.calpoly.edu hornet 129.65.241.8 hornet-srv.csc.calpoly.edu hornet-srv 129.65.54.9 onion.csc.calpoly.edu onion 129.65.241.3 hercules.csc.calpoly.edu hercules
  • 54. The Domain Name System (DNS) For user friendliness, each Internet address is mapped to a symbolic name, using the DNS, in the format of: <computer-name>.<subdomain hierarchy>.<organization>.<sector name>{.<country code>} e.g., www.csc.calpoly.edu.us 05/13/14 54 r o o t c o m e d u g o v n e t o r g m i l o r g a n i z a t i o n ... ... h o s t n a m e t o p - l e v e l d o m a i n s u b d o m a i n i n t h e U . S . T o p - l e v e l d o m a i n n a m e h a s t o b e a p p l i e d f o r . S u b d o m a i n h i e r a c h y a n d n a m e s a r e a s s i g n e d b y t h e o r g a n i z a t i o n . c o u n t r y c o d e
  • 55. The Domain Name System For network applications, a domain name must be mapped to its corresponding Internet address. Processes known as domain name system servers provide the mapping service, based on a distributed database of the mapping scheme. The mapping service is offered by thousands of DNS servers on the Internet, each responsible for a portion of the name space, called a zone. The servers that have access to the DNS information (zone file) for a zone is said to have authority for that zone.
  • 56. Top-level Domain Names .com: For commercial entities, which anyone, anywhere in the world, can register. .net : Originally designated for organizations directly involved in Internet operations. It is increasingly being used by businesses when the desired name under "com" is already registered by another organization. Today anyone can register a name in the Net domain. .org: For miscellaneous organizations, including non-profits. .edu: For four-year accredited institutions of higher learning. .gov: For US Federal Government entities .mil: For US military Country Codes :For individual countries based on the International Standards Organization. For example, ca for Canada, and jp for Japan.
  • 57. Example Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Another example: Given the address 224.0.0.1, one can expand it as follows: The binary prefix of 1110 signifies that this is class D, or multicast, address. Data packets sent to this address should therefore be delivered to the multicast group 0000000000000000000000000001. 2 2 4 . 0 . 0 . 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
  • 58. Network Basics 2. Addressing a process running on a host Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
  • 59. Addressing a process running on a host Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 ... p r o c e s s p o r t ...h o s t A h o s t B T h e I n t e r n e t E a c h h o s t h a s 6 5 5 3 6 p o r t s .
  • 60. Well Known Ports Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Each Internet host has 216 (65,535) logical ports. Each port is identified by a number between 1 and 65535, and can be allocated to a particular process. Port numbers beween 1 and 1023 are reserved for processes which provide well-known services such as finger, FTP, HTTP, and email.
  • 61. Well Known Ports Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 P r o t o c o l P o r t S e r v ic e e c h o 7 IP C te s tin g d a y tim e 1 3 p r o v id e s th e c u r r e n t d a te a n d tim e ftp 2 1 file tr a n s fe r p r o to c o l te ln e t 2 3 r e m o te , c o m m a n d - lin e te r m in a l s e s s io n s m tp 2 5 s im p le m a il tr a n s fe r p r o to c o l tim e 3 7 p r o v id e s a s ta n d a r d tim e fin g e r 7 9 p r o v id e s in fo r m a tio n a b o u t a u s e r h ttp 8 0 w e b s e r v e r R M I R e g is tr y 1 0 9 9 re g is tr y fo r R e m o te M e th o d In v o c a tio n s p e c ia l w e b s e r v e r 8 0 8 0 w e b s e r v e r w h ic h s u p p o r ts s e r v le ts , J S P , o r A S P A s s ig n m e n t o f s o m e w e ll- k n o w n p o r t s
  • 62. Choose a port Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 For our programming exercises: when a port is needed, choose a random number above the well known ports: 1,024- 65,535. If you are providing a network service for the community, then arrange to have a port assigned to and reserved for your service.
  • 63. Network Basics 3. Addressing a Web Document Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
  • 64. The Uniform Resource Identifier (URI) Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 Resources to be shared on a network need to be uniquely identifiable. On the Internet, a URI is a character string which allows a resource to be located. There are two types of URIs: URL (Uniform Resource Locator) points to a specific resource at a specific location URN (Uniform Resource Name) points to a specific resource at a nonspecific location. “A URN is like a person's name, while a URL is like their street address. The URN defines something's identity, while the URL provides a method for finding something. Essentially, "what" vs. "where".” (from Wiki)
  • 65. URL Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005 A URL has the format of: protocol://host address[:port]/directory path/file name#section A s a m p l e U R L : h t t p :/ / w w w . c s c . c a lp o ly . e d u :8 0 8 0 / ~ m liu / C S C 3 6 9 / h w . h t m l # h w 1 p r o t o c o l o f s e r v e r h o s t n a m e p o r t n u m b e r o f s e r v e r p r o c e s s d ir e c t o r y p a t h f ile n a m e s e c t io n n a m e O t h e r p r o t o c o l s t h a t c a n a p p e a r i n a U R L a r e : f i l e f t p g o p h e r n e w s t e l n e t W A I S