Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
NSCETE-LEARNING
PRESENTATIONLISTEN … LEARN… LEAD…
Department of CSE NSCETPage 1 of 79
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
III YEAR / VIth SEMESTER
CS8603 – DISTRIBUTED SYSTEMS
VIGNESH L S M.E.,AP/CSE
Nadar Saraswathi College of Engineering & Technology,Vadapudupatti, Annanji (po), Theni – 625531.
Department of CSE NSCETPage 2 of 79
UNIT 01 - INTRODUCTION
Department of CSE NSCETPage 3 of 79
Distributed Systems
CS8603
INTRODUCTION
Department of CSE NSCETPage 4 of 79
WHAT ?
TANENBAUM
A distributed system is a collection of independent computers that
appears to its users as a single coherent system.
2 Aspects
DS consists of components (i.e., computers) that are autonomous.
The Second aspect is that users think they are dealing with a single
system. This means that one way or the other the autonomous
components need to collaborate.
Department of CSE NSCETPage 5 of 79
Factors to be considered for creating a DS…
Let us discuss about four important goals for building a distributed
system worth the effort
Making Resources Accessible
Distributed Transparency
Openness
Scalability
Department of CSE NSCETPage 6 of 79
Making Resources Accessible
As a whole let us consider an example of Bachman Lab and our HOD Room
The HOD has a separate Printer and moreover all the other students of
third cse who are in bachman lab can be able to take their document print
outs from their labs as they will not be provided with the separate
printers
Ex Resources : Printers, computers, storage facilities, data, files, Web
pages, and networks,
Department of CSE NSCETPage 7 of 79
Distributed Transparency
A distributed system should look like a single computer systemto the users which is said to be transparent.
Types of Transparency
1. Access - Different OS
2. Location - Downloading
3. Migration - Transferring a data from one end to other
4. Relocation -
5. Replication – Making copies of a file
6. Concurrency - Locks can be used
7. Failure - accessing a site
Department of CSE NSCETPage 8 of 79
Types of Transparency
Department of CSE NSCETPage 9 of 79
Openness
The openness of DS is determined primarily by the
degree to which new resource-sharing services can be
added and be made available for use by a variety of client
programs.
Department of CSE NSCETPage 10 of 79
Scalability
A system is described as scalable if it remains effective when there
is a significant increase in the number of resources and the number of
users.
Challenges:
Controlling the cost of resources or money.
Controlling the performance loss.
Department of CSE NSCETPage 11 of 79
Examples of Distributed Systems
Local Area Network and Intranet
Database Management System
Internet/World-Wide Web
Mobile and Ubiquitous Computing
Department of CSE NSCETPage 12 of 79
Local Area Network and Intranet
the res t of
em ail server
Web server
Desktopcomputers
File server
router/ firewall
print and other servers
other servers
Local area
network
em ail server
the Internet
Department of CSE NSCETPage 13 of 79
Database Management Systems
Department of CSE NSCETPage 14 of 79
Internet
intranet
ISP
desktop computer:
backbone
satellite link
server:
%
network link:
%
%
%
Department of CSE NSCETPage 15 of 79
World Wide Web
Department of CSE NSCETPage 16 of 79
Mobile & Ubiquitous Computing
Laptop
Mobile
PrinterCamera
Internet
Host intranet Home intranetGSM/GPRS
Wireless LAN
phone
gateway
Host site
Department of CSE NSCETPage 17 of 79
Figure 1.1 (see book for the full text)
Selected application domains and associated networked applications
Finance and commerce eCommerce e.g. Amazon and eBay, PayPal,
online banking and trading
The information society Web information and search engines, ebooks,
Wikipedia; social networking: Facebook and MySpace.
Creative industries and
entertainment
online gaming, music and film in the home, user-
generated content, e.g. YouTube, Flickr
Healthcare health informatics, on online patient records,
monitoring patients
Education e-learning, virtual learning environments;
distance learning
Transport and logistics GPS in route finding systems, map services:
Google Maps, Google Earth
Science The Grid as an enabling technology for
collaboration between scientists
Environmental management sensor technology to monitor earthquakes,
floods or tsunamis
Department of CSE NSCETPage 18 of 79
Figure 1.2
An example financial trading system
Department of CSE NSCETPage 19 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
intranet
ISP
desktop computer:
backbone
satellite link
server:
☎
network link:
☎
☎
☎
Figure 1.3
A typical portion of the Internet
Department of CSE NSCETPage 20 of 79
Figure 1.4
Portable and handheld devices in a distributed system
Department of CSE NSCETPage 21 of 79
Figure 1.5
Cloud computing
Department of CSE NSCETPage 22 of 79
Figure 1.6
Growth of the Internet (computers and web servers)
Date Computers Web servers Percentage
1993, July 1,776,000 130 0.008
1995, July 6,642,000 23,500 0.4
1997, July 19,540,000 1,203,096 6
1999, July 56,218,000 6,598,697 12
2001, July 125,888,197 31,299,592 25
42,298,3712003, July
2005, July
~200,000,000
353,284,187 67,571,581
21
19
Department of CSE NSCETPage 23 of 79
Section 1.5.7
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.
Department of CSE NSCETPage 24 of 79
Figure 1.7
Web servers and web browsers
Internet
BrowsersWeb servers
www.google.com
www.cdk5.net
www.w3c.org
standards
faq.html
http://www.w3.org/standards/faq.html#conformance
http://www.google.comlsearch?q=obama
http://www.cdk5.net/
File system ofwww.w3c.org
Department of CSE NSCETPage 25 of 79
Figure 13.1
Composed naming domains used to access a resource from a URL
http://www.cdk3.net:8888/WebExamples/earth.html
URL
Resource ID (IP number, port number, pathname)
Network address
2:60:8c:2:b0:5afile
Web server
55.55.55.55 WebExamples/earth.html8888
DNS lookup
Socket
http://www.cdk5.net:8888/WebExamples/earth.html
2:60:8c:2:b0:5a
Department of CSE NSCETPage 26 of 79
Figure 13.2
Iterative navigation
Client1
2
3
A client iteratively contacts name servers NS1–NS3 in order to resolve a name
NS2
NS1
NS3
Nameservers
Department of CSE NSCETPage 27 of 79
Figure 13.3
Non-recursive and recursive server-controlled navigation
1
2
3
5
1
2
34
4
A name server NS1 communicates with other name servers on behalf of a client
client client
Recursiveserver-controlled
NS2
NS1
NS3
NS2
NS1
NS3
Non-recursiveserver-controlled
Department of CSE NSCETPage 28 of 79
Figure 13.4
DNS name servers
Note: Name server names
are in italics, and the
corresponding domains are in
parentheses.
Arrows denote name
server entries
a.root-servers.net
(root)
ns0.ja.net(ac.uk)
dns0.dcs.qmul.ac.uk(dcs.qmul.ac.uk)
alpha.qmul.ac.uk(qmul.ac.uk)
dns0-doc.ic.ac.uk(ic.ac.uk)
ns.purdue.edu(purdue.edu)
ukpurdue.edu
ic.ac.uk
qmul.ac.uk
dcs.qmul.ac.uk
*.qmul.ac.uk*.ic.ac.uk
*.dcs.qmwul.ac.uk
* .purdue.edu
ns1.nic.uk(uk)
ac.uk
co.uk
yahoo.com
Department of CSE NSCETPage 29 of 79
Figure 13.5
DNS resource records
Record type Meaning Main contents
A A computer address IP number
NS An authoritative name server Domain name for server
CNAME The canonical name for an alias Domain name for alias
SOA Marks the start of data for a zone Parameters governing the zone
WKS A well-known service description List of service names and protocols
PTR Domain name pointer (reverselookups)
Domain name
HINFO Host information Machine architecture and operatingsystem
MX Mail exchange List of <preference, host > pairs
TXT Text string Arbitrary text
Department of CSE NSCETPage 30 of 79
Figure 13.6
DNS zone data records
domain name time to live class type value
1D IN NS dns0
1D IN NS dns1
1D IN NS cancer.ucs.ed.ac.uk
1D IN MX 1 mail1.qmul.ac.uk
1D IN MX 2 mail2.qmul.ac.uk
domain name time to live class type value
www 1D IN CNAME apricot
apricot 1D IN A 138.37.88.248
dcs 1D IN NS dns0.dcs
dns0.dcs 1D IN A 138.37.88.249
dcs 1D IN NS dns1.dcs
dns1.dcs 1D IN A 138.37.94.248
dcs.qmul.ac.uk
dcs.qmul.ac.uk
dcs.qmul.ac.uk
dcs.qmul.ac.uk
dcs.qmul.ac.uk
Department of CSE NSCETPage 31 of 79
Figure 13.7
GNS directory tree and value tree for user Peter.Smith
UK FR
AC
QMWDI: 322
Peter.Smith
passwordmailboxes
DI: 599 (EC)
DI: 574DI: 543
DI: 437
Alpha GammaBeta
Department of CSE NSCETPage 32 of 79
Figure 13.8
Merging trees under a new root
EC
UK FR
DI: 599
DI: 574DI: 543
NORTH AMERICA
US
DI: 642
DI: 457DI: 732
#599 = #633/EC#642 = #633/NORTH AMERICA
Well-known directories:
CANADA
DI: 633 (WORLD)
Department of CSE NSCETPage 33 of 79
Figure 13.9
Restructuring the directory
EC
UK FR
DI: 599
DI: 574DI: 543
NORTH AMERICA
US
DI: 642
DI: 457DI: 732CANADA
DI: 633 (WORLD)
#633/EC/US
US
#599 = #633/EC#642 = #633/NORTH AMERICA
Well-known directories:
Department of CSE NSCETPage 34 of 79
Figure 13.10
X.500 service architecture
DSA
DSA
DSA
DSA
DSADSADUA
DUA
DUA
Department of CSE NSCETPage 35 of 79
Figure 13.11
Part of the X.500 Directory Information Tree
... France (country) Great Britain (country) Greece (country) ...
BT Plc (organization) University of Gormenghast (organization)... ...
Department of Computer Science (organizationalUnit)
Computing Service (organizationalUnit)
Engineering Department (organizationalUnit)
...
...
X.500 Service (root)
Departmental Staff (organizationalUnit)
Research Students (organizationalUnit)
ely (applicationProcess)
...
...
Alice Flintstone (person) Pat King (person) James Healey (person) ...... Janet Papworth (person)...
Department of CSE NSCETPage 36 of 79
Figure 13.12
An X.500 DIB Entry
info
Alice Flintstone, Departmental Staff, Department of Computer Science, University of Gormenghast, GB
commonName
Alice.L.FlintstoneAlice.FlintstoneAlice FlintstoneA. Flintstone
surname
Flintstone
telephoneNumber
+44 986 33 4604
uid
alf
roomNumber
Z42
userClass
Research Fellow
Department of CSE NSCETPage 37 of 79
Figure 3.1
Network performance
km
Department of CSE NSCETPage 38 of 79
Figure 3.2
Conceptual layering of protocol software
Layer n
Layer 2
Layer 1
Message sent Message received
Communication
medium
Sender Recipient
Department of CSE NSCETPage 39 of 79
Figure 3.3
Encapsulation as it is applied in layered protocols
Presentat ion header
Application-layer message
Session header
Transport header
Network header
Department of CSE NSCETPage 40 of 79
Figure 3.4
Protocol layers in the ISO Open Systems Interconnection (OSI) model
Application
Presentat ion
Session
Transport
Network
Data link
Physical
Message sent Message received
Sender Rec ipient
Layers
Communicat ion
medium
Department of CSE NSCETPage 41 of 79
Figure 3.5
OSI protocol summary
Layer Description Examples
Application Protocols that are designed to meet the communication requirements ofspecific 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 isindependent of the representations used in individual computers, which maydiffer. Encryption is also performed in this layer, if required.
Secure Sockets(SSL),CORBA DataRep.
Session At this level reliability and adaptation are performed, such as detection offailures 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 WANor an internetwork this involves the generation of a route passing throughrouters. In a single LAN no routing is required.
IP, ATM virtualcircuits
Data link Responsible for transmission of packets between nodes that are directlyconnected by a physical link. In a WAN transmission is between pairs ofrouters 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 ofbinary data by analogue signalling, using amplitude or frequency modulationof electrical signals (on cable circuits), light signals (on fibre optic circuits)or other electromagnetic signals (on radio and microwave circuits).
Ethernet base- bandsignalling, ISDN
Department of CSE NSCETPage 42 of 79
Figure 3.6
Internetwork layers
Underlying network
Application
Network interface
Transport
Internetwork
Internetwork packets
Network-spec ific packets
MessageLayers
Internetworkprotocols
Underlyingnetworkprotocols
Department of CSE NSCETPage 43 of 79
Figure 3.7
Routing in a wide area network
HostsLinks
or local
networks
A
D E
B
C
1
2
5
43
6
Routers
Department of CSE NSCETPage 44 of 79
Figure 3.8
Routing tables for the network in Figure 3.7
Routings from D Routings from E
To Link Cost To Link Cost
A
B
C
D
E
3
3
6
local
6
1
2
2
0
1
A
B
C
D
E
4
4
5
6
local
2
1
1
1
0
Routings from A Routings from B Routings from C
To Link Cost To Link Cost To Link Cost
A
B
C
D
E
local
1
1
3
1
0
1
2
1
2
A
B
C
D
E
1
local
2
1
4
1
0
1
2
1
A
B
C
D
E
2
2
local
5
5
2
1
0
2
1
Department of CSE NSCETPage 45 of 79
Figure 3.9
Pseudo-code for RIP routing algorithm
Send: Each t seconds or when Tl changes, send Tl on each non-faulty outgoing link.
Receive: Whenever a routing table Tr is received on link n:
for all rows Rr in Tr {
if (Rr.link | n) {
Rr.cost = Rr.cost + 1;
Rr.link = n;
if (Rr.destination is not in Tl) add Rr to Tl;
// add new destination to Tl
else for all rows Rl in Tl {
if (Rr.destination = Rl.destination and
(Rr.cost < Rl.cost or Rl.link = n)) Rl = Rr;
// Rr.cost < Rl.cost : remote node has better route
// Rl.link = n : remote node is more authoritative
}
}
}
Department of CSE NSCETPage 46 of 79
Figure 3.10
Simplified view of part of a university campus network
file
compute
dialup
hammer
henry
hotpoint
138.37.88.230
138.37.88.162
bruno138.37.88.249
router/sickle
138.37.95.241138.37.95.240/29
138.37.95.249
copper138.37.88.248
firewall
web
138.37.95.248/29
server
desktop computers 138.37.88.xx
subnet
subnet
Eswitch
138.37.88
server
server
server
138.37.88.251
custard138.37.94.246
desktop computers
Eswitch
138.37.94
hubhub
Student subnetStaff subnet
otherservers
router/firewall
138.37.94.251
☎
1000 Mbps Ethernet
Eswitch: Ethernet switch
100 Mbps Ethernet
file server/gateway
printers
Campusrouter
Campusrouter
138.37.94.xx
Department of CSE NSCETPage 47 of 79
Figure 3.11
Tunnelling for IPv6 migration
A BIPv6 IPv6
IPv6 encapsulated in IPv4 packets
Encapsulators
IPv4 network
Department of CSE NSCETPage 48 of 79
Figure 3.12
TCP/IP layers
Messages (UDP) or Streams (TCP)
Application
Transport
Internet
UDP or TCP packets
IP datagrams
Network-specific frames
MessageLayers
Underlying network
Network interface
Department of CSE NSCETPage 49 of 79
Figure 3.13
Encapsulation in a message transmitted via TCP over an Ethernet
Application message
TCP header
IP header
Ethernet header
Ethernet frame
port
TCP
IP
Department of CSE NSCETPage 50 of 79
Figure 3.14
The programmer's conceptual view of a TCP/IP Internet
IP
Application Application
TCP UDP
Department of CSE NSCETPage 51 of 79
Figure 3.15
Internet address structure, showing field sizes in bits
7 24
Class A: 0 Network ID Host ID
14 16
Class B: 1 0 Network ID Host ID
21 8
Class C: 1 1 0 Network ID Host ID
28
Class D (mult icast): 1 1 1 0 Mult icast address
27
Class E (reserved): 1 1 1 1 unused0
28
Department of CSE NSCETPage 52 of 79
Figure 3.16
Decimal representation of Internet addresses
octet 1 octet 2 octet 3
Class A: 1 to 127
0 to 255 0 to 255 1 to 254
Class B: 128 to 191
Class C: 192 to 223
224 to 239 Class 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
0 to 255 0 to 255 1 to 254240 to 255 Class E (reserved):
1.0.0.0 to 127.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
Department of CSE NSCETPage 53 of 79
Figure 3.17
IP packet layout
dataIP address of destinationIP address of source
header
up to 64 kilobytes
Department of CSE NSCETPage 54 of 79
Figure 3.18
A typical NAT-based home network
Department of CSE NSCETPage 55 of 79
Figure 3.19
IPv6 header layout
Source
address(128
bits)
Destination
address(128
bits)
Version (4
bits)
Traffic class (8
bits)
Flow label (20
bits)Payload length (16
bits)
Hop limit (8
bits)
Next header (8
bits)
Department of CSE NSCETPage 56 of 79
Figure 3.20
The MobileIP routing mechanism
Sender
Home
Mobile host MH
Foreign agent FA
Internet
agent
First IP packet
addressed to MH
Address of FA
returned to sender
First IP packet
tunnelled to FA
Subsequent IP packets
tunnelled to FA
Department of CSE NSCETPage 57 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 3.21
Firewall configurations
Internet
Router/Protected intranet
a) Filtering router
Internet
b) Filtering router and bas tion
filter
Internet
R/filterc) Screened subnet for bast ion R/filter Bastion
R/filter Bastion
web/ftpserver
web/ftpserver
web/ftpserver
Department of CSE NSCETPage 58 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 3.22
IEEE 802 network standards
IEEE No. Name Title Reference
802.3 Ethernet CSMA/CD Networks (Ethernet) [IEEE 1985a]
802.4 Token Bus Networks [IEEE 1985b]
802.5 Token Ring Networks [IEEE 1985c]
802.6 Metropolitan Area Networks [IEEE 1994]
802.11 WiFi Wireless Local Area Networks [IEEE 1999]
802.15.1 Bluetooth Wireless Personal Area Networks [IEEE 2002]
802.15.4 ZigBee Wireless Sensor Networks [IEEE 2003]
802.16 WiMAX Wireless Metropolitan Area Networks [IEEE 2004a]
Department of CSE NSCETPage 59 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 3.23
Ethernet ranges and speeds
10Base5 10BaseT 100BaseT 1000BaseT
Data rate 10 Mbps 10 Mbps 100 Mbps 1000 Mbps
Max. segment lengths:
Twisted wire (UTP) 100 m 100 m 100 m 25 m
Coaxial cable (STP) 500 m 500 m 500 m 25 m
Multi-mode fibre 2000 m 2000 m 500 m 500 m
Mono-mode fibre 25000 m 25000 m 20000 m 2000 m
Department of CSE NSCETPage 60 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 3.24
Wireless LAN configuration
LAN
Server
WirelessLAN
Laptops
Base stat ion/access point
Palmtop
radio obs truct ion
A B C
DE
Department of CSE NSCETPage 61 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 3.25
Bluetooth frame structure
SCO packets (e.g. for voice data) have a 240-bit payload containing 80 bits
of data triplicated, filling exactly one timeslot.
bits: 72 18 18 18 0 - 2744
Access code Headercopy 1
Header
copy 2
Headercopy 3
Data for transmission
bits: 3 1 1 1 4 8
Destination Flow Ack Seq Type Header checksum
Address withinPiconet
= ACL, SCO,poll, null
Header
Department of CSE NSCETPage 62 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.1
Skew between computer clocks in a distributed system
Department of CSE NSCETPage 63 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.2
Clock synchronization using a time server
mr
m t
p Time server,S
Department of CSE NSCETPage 64 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.3
An example synchronization subnet in an NTP implementation
1
2
3
2
3 3
Note: Arrows denote synchronization control, numbers denote
strata.
Department of CSE NSCETPage 65 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.4
Messages exchanged between a pair of NTP peers
Ti
Ti-1Ti-2
Ti- 3
Server B
Server A
Time
m m'
Time
Department of CSE NSCETPage 66 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.5
Events occurring at three processes
Department of CSE NSCETPage 67 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.6
Lamport timestamps for the events shown in Figure 14.5
Department of CSE NSCETPage 68 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.7
Vector timestamps for the events shown in Figure 14.5
Department of CSE NSCETPage 69 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.8
Detecting global properties
Department of CSE NSCETPage 70 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.9
Cuts
m1 m2
p1
p2Physical
time
e1
0
Consistent cut
Inconsistent cut
e 1
1e 1
2e 1
3
e 20
e 21
e 22
Department of CSE NSCETPage 71 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.10
Chandy and Lamport’s ‘snapshot’ algorithm
Marker receiving rule for process pi
On pi’s receipt of a marker message over channel c:
if (pi has not yet recorded its state) it
records its process state now;
records the state of c as the empty set;
turns on recording of messages arriving over other incoming channels;
else
pi records the state of c as the set of messages it has received over c
since it saved its state.
end if
Marker sending rule for process pi
After pi has recorded its state, for each outgoing channel c:
pi sends one marker message over c
(before it sends any other message over c).
Department of CSE NSCETPage 72 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.11
Two processes and their initial states
Department of CSE NSCETPage 73 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.12
The execution of the processes in Figure 14.11
Department of CSE NSCETPage 74 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.13
Reachability between states in the snapshot algorithm
Sinit Sfinal
Ssnap
actual execution e0,e1,...
recording recording begins ends
pre-snap: e'0,e '1,...e'R-1 post-snap: e 'R,e 'R+1,...
'
Department of CSE NSCETPage 75 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.14
Vector timestamps and variable values for the execution of Figure 14.9
m1 m2
p1
p2Physical
time
Cut C1
(1,0) (2,0) (4,3)
(2,1) (2,2) (2,3)
(3,0)
x1= 1 x1= 100 x1= 105
x2= 100 x2= 95 x2= 90
x1= 90
Cut C 2
Department of CSE NSCETPage 76 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.15
The lattice of global states for the execution of Figure 14.14
Sij = global state after i events at process 1and j events at process 2
S00
S10
S20
S21S30
S31
S32
S22
S23
S33
S43
Level 0
1
2
3
4
5
6
7
Department of CSE NSCETPage 77 of 79
Instructor’s Guide for Coulouris, Dollimore, Kindberg and Blair, Distributed Systems: Concepts and Design Edn. 5
© Pearson Education 2012
Figure 14.16
Algorithms to evaluate possibly and definitely
Department of CSE NSCETPage 78 of 79
Figure 14.17
Evaluating definitely
Department of CSE NSCETPage 79 of 79