Title: Distributed Systems Concepts
1Distributed Systems Concepts
2Figure 10.1Skew between computer clocks in a
distributed system
3Figure 10.2Clock synchronization using a time
server
4Figure 10.3An example synchronization subnet in
an NTP implementation
5Figure 10.4Messages exchanged between a pair of
NTP peers
6Figure 10.5Events occurring at three processes
7Figure 10.6Lamport timestamps for the events
shown in Figure 10.5
8Figure 10.7Vector timestamps for the events
shown in Figure 10.5
9Figure 10.8Detecting global properties
10Figure 10.9Cuts
11Figure 10.10Chandy and Lamports snapshot
algorithm
Marker receiving rule for process pi On pis
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).
12Figure 10.11Two processes and their initial
states
13Figure 10.12The execution of the processes in
Figure 10.11
14Figure 10.13Reachability between states in the
snapshot algorithm
15Figure 10.14Vector timestamps and variable
values for the execution of Figure 10.9
16Chapter 11,12, and 13
- Are on transaction an concurrency control that
are typically covered in a data base course.
17Ch 14 Fault Tolerance
18Figure 14.1A basic architectural model for the
management of replicated data
Requests and
replies
RM
RM
FE
C
Clients
Front ends
Service
Replica
C
FE
RM
managers
19Figure 14.2Services provided for process groups
20Figure 14.3View-synchronous group communication
21Figure 14.4The passive (primary-backup) model
for fault tolerance
22Figure 14.5Active replication
23Ch.15 Distributed Multimedia Systems
24Figure 15.1A distributed multimedia system
25Figure 15.2The window of scarcity for computing
and communication resources
26Figure 15.3Characteristics of typical multimedia
streams
27Figure 15.4Typical infrastructure components for
multimedia applications
28Figure 15.5QoS specifications for components of
the application shown in Figure 15.4
29Figure 15.6The QoS managers task
30Figure 15.7Traffic shaping algorithms
31Figure 15.8The RFC 1363 Flow Spec
Bandwidth
Delay
Loss
32Figure 15.9Filtering
Source
Targets
High
bandwidth
Medium
bandwidth
Low
bandwidth
33Figure 15.10Tiger video file server hardware
configuration
Controller
low-bandwidth network
0
n1
1
n2
2
n3
n4
n
2n1
3
Cub 0
Cub 1
Cub 2
Cub 3
Cub n
high-bandwidth
ATM switching network
Start/Stop
requests from clients
video distribution to clients
34Figure 15.11Tiger schedule
3516 Distributed Shared Memory
36Figure 16.1The distributed shared memory
abstraction
37Figure 16.2Mether system program - slide 1
include "world.h" struct shared int a,b
Program Writer main() struct shared
p methersetup() / Initialize the Mether
run-time / p (struct shared
)METHERBASE / overlay structure on
METHER segment / p-gta p-gtb 0 /
initialize fields to zero / while(TRUE) /
continuously update structure fields / p gta
p gta 1 p gtb p gtb - 1
Continued on next slide...
38Figure 16.2Mether system program - slide 2
Program Reader main() struct shared
p methersetup() p (struct shared
)METHERBASE while(TRUE) / read the fields
once every second / printf("a d, b
d\n", p gta, p gtb) sleep(1)
39Figure 16.5DSM using write-update
40Figure 16.6Data items laid out over pages
41Figure 17.1IDL interfaces Shape and ShapeList
struct Rectangle 1 long width long
height long x long y
struct GraphicalObject 2 string type
Rectangle enclosing boolean isFilled
interface Shape 3 long getVersion()
GraphicalObject getAllState() // returns
state of the GraphicalObject
typedef sequence ltShape, 100gt All 4 interface
ShapeList 5 exception FullException
6 Shape newShape(in GraphicalObject g) raises
(FullException) 7 All allShapes() // returns
sequence of remote object references 8 long
getVersion()
42Figure 17.2Java interface ShapeList generated by
idltojava from CORBA interface ShapeList
public interface ShapeList extends
org.omg.CORBA.Object Shape newShape(GraphicalOb
ject g) throws ShapeListPackage.FullException Sh
ape allShapes() int getVersion()
43Figure 17.3ShapeListServant class of the Java
server program for CORBA interface ShapeList
import org.omg.CORBA. class ShapeListServant
extends _ShapeListImplBase ORB
theOrb private Shape theList private int
version private static int n0 public
ShapeListServant(ORB orb) theOrb orb
// initialize the other instance
variables public Shape newShape(GraphicalObjec
t g) throws ShapeListPackage.FullException
1 version Shape s new
ShapeServant( g, version) if(n gt100)
throw new ShapeListPackage.FullException()
theListn s 2 theOrb.connect(s)
return s public
Shape allShapes() ... public int
getVersion() ...
44Figure 17.4Java class ShapeListServer
import org.omg.CosNaming. import
org.omg.CosNaming.NamingContextPackage. import
org.omg.CORBA. public class ShapeListServer
public static void main(String args)
try ORB orb ORB.init(args, null) 1
ShapeListServant shapeRef new
ShapeListServant(orb) 2 orb.connect(shape
Ref) 3
org.omg.CORBA.Object objRef
orb.resolve_initial_references("NameService")
4 NamingContext ncRef
NamingContextHelper.narrow(objRef) NameCompone
nt nc new NameComponent("ShapeList",
"") 5 NameComponent path
nc 6 ncRef.rebind(path, shapeRef)
7
java.lang.Object sync new
java.lang.Object() synchronized (sync)
sync.wait() catch (Exception e) ...
45Figure 17.5Java client program for CORBA
interfaces Shape and ShapeList
import org.omg.CosNaming. import
org.omg.CosNaming.NamingContextPackage. import
org.omg.CORBA. public class ShapeListClient pu
blic static void main(String args)
try ORB orb ORB.init(args, null)
1 org.omg.CORBA.Object objRef
orb.resolve_initial_references("NameService")
NamingContext ncRef NamingContextHelper.nar
row(objRef) NameComponent nc new
NameComponent("ShapeList", "") NameComponent
path nc ShapeList shapeListRef
ShapeListHelper.narrow(ncRef.resolve(path))
2 Shape sList shapeListRef.allShapes() 3
GraphicalObject g sList0.getAllState() 4
catch(org.omg.CORBA.SystemException e) ...
46Figure 17.6The main components of the CORBA
architecture
47Figure 17.7IDL module Whiteboard
module Whiteboard struct Rectangle ...
struct GraphicalObject ... interface
Shape ... typedef sequence ltShape, 100gt
All interface ShapeList ...
48Figure 17.8IDL constructed types 1
this figure continues on the next slide
49Figure 17.8 IDL constructed types 2
50Page 684CORBA interoperable object references
51Figure 17.9Naming graph in CORBA Naming Service
initial naming context
initial naming context
initial naming context
XX
B
ShapeList
V
P
C
T
D
E
S
R
Q
U
52Figure 17.10Part of the CORBA Naming Service
NamingContext interface in IDL
struct NameComponent string id string kind
typedef sequence ltNameComponentgt
Name interface NamingContext void bind (in
Name n, in Object obj) binds the given name
and remote object reference in my context. void
unbind (in Name n) removes an existing binding
with the given name. void bind_new_context(in
Name n) creates a new naming context and binds
it to a given name in my context. Object resolve
(in Name n) looks up the name in my context and
returns its remote object reference. void list
(in unsigned long how_many, out BindingList bl,
out BindingIterator bi) returns the names in the
bindings in my context.
53Figure 17.11CORBA event channels