Adaptive Plausible Clocks

Adaptive Plausible Clocks
Adaptive Plausible
Clocks
Anders Gidenstam
Marina Papatriantafilou
1/18
ICDCS’04 Anders Gidenstam
2004-03-25
Outline
|
|
Background
z
Time, Clocks and event orderings
z
Previous Work
Contributions
z
Non-uniformly mapped vector (NUREV) clocks
z
How to avoid information loss
R-Others NUREV clock
z
z
z
MinDiff NUREV clock
Experimental results
|
Conclusions
|
Future work
2/18
ICDCS’04 Anders Gidenstam
2004-03-25
Time, Clocks and event
orderings
|
Distributed system
z
N processes: P1, P2, ..., PN
• Communicate through messages
• Asynchronous system
• No physical clock
z
Events: send/receive message or local step
P1
P2
P3
P4
3/18
ICDCS’04 Anders Gidenstam
2004-03-25
Time, Clocks and event
orderings
|
We want to order the events of an execution
z
Why?
• As part of some distributed algorithm
• E.g. Caching of replicated shared objects
•
Causally consistent multicast
• For monitoring, debugging etc.
z
How?
• Use a logical clock algorithm (a.k.a time stamping
system) to assign timestamps to the events
• Timestamps
• Equality and ordering operators: =LC, <LC
• Concurrent if incomparable (unorderable)
4/18
ICDCS’04 Anders Gidenstam
2004-03-25
Event orderings
|
A
Total order
No concurrency
z Example: A < C < B < D < E
z
|
C
B
D
E
Causal order
”happened before” or ”knows about” relation
z Example: A || C, B || C, B || D, B || E
z
5/18
ICDCS’04 Anders Gidenstam
2004-03-25
Previous Work
|
2
Lamport Clocks [Lamport 1978]
z
Total order (with tie-breaker)
2
|
Local update
<LC
3
3
<LC
P1
Receive msg update
P3
3
z
N clock entries
Causal order
6/18
<VC
2
1
2
0
3
0
0
0
4
Local
Process
ID update
1
2
3
0
0
0
20
P1
2
0
0
0
3
1
Vector Clocks [Fidge, 1991, Mattern, 1988, Schmuck, 1988]
z
3
<VC
2
1
2
0
0
30
Receive msg update
4
0
P3 1 5
1
0
ICDCS’04 Anders Gidenstam
6
2
1
2
0
2004-03-25
2
1
3
0
Process ID
Clock vector
1
Previous Work
2
3
|
Plausible Clocks [Torres-Rojas and Ahamad, 1999]
z
4
Class of logical clocks
5
• Orders events consistent with causal order, but
may also order concurrent events.
• Includes: Lamport Clock and Vector clock
Local update
• R-Entry Vector Clock
• R clock entries
• Clock vector indexed by Process ID mod R
2
0
<REV
3
1
3
1
3
0
7/18
<REV
<REV
3
0
2
0
3
0
P1
Receive msg update
3
1
ICDCS’04 Anders Gidenstam
P3
1
1
3
1
2004-03-25
4
1
Non-uniformly mapped R-entry
vector (NUREV) clocks
Vector
NUREVclock
clock
|
A generalization of R-entry vector clocks
z
z
z
ProcessID
ID
Process
Allows a different mapping between
process ID and clock entry in each
timestamp
Allows (for example) self tuning and
adaptation of the timestamping system
11
We have proved that
55
All NUREV clocks are plausible clocks.
• Regardless of mapping function and how it changes.
22
Clock vector
Mapping
Mapping
Clock vector
33
44
66
77
8/18
ICDCS’04 Anders Gidenstam
2004-03-25
How to avoid information loss?
|
Where is ordering information lost?
z
Inflation of one process key introduces ordering among
concurrent events
Bdep-error sequence
Bindep-error sequence
Minimize inflation at updates
| Choose the mapping so that the
inflation is small.
9/18
Next-Contact
| Avoid inflating the keys of processes
you won’t hear from in a long time
ICDCS’04 Anders Gidenstam
2004-03-25
R-Others Clock (ROV)
|
Idea
z
z
Process ID
Preserve recent information
Use exclusive entry for
• own key
• R-2 other processes’ keys
(Last R-2 communication partners)
z
|
All other process keys share one entry
Benefits
z
z
Constant-size timestamps
Agrees well with Next-Contact
10/18
ICDCS’04 Anders Gidenstam
1
2
3
Clock vector
4
5
6
7
2004-03-25
Msg from P1
MinDiff clock
1
Clock vector
2
3
+
4
|
Idea
z
Minimize the inflation at each clock
update
• Use exclusive entry for own key
• Select a new mapping function on each
receive update
• Map process keys with similar values to
the same entry
z
P2’s old clock
5
Timestamps need to include mapping
• Small for a small number of clock entries
Clock vector
1
2
3
4
5
P2’s new clock
1
Clock vector
2
3
4
5
11/18
ICDCS’04 Anders Gidenstam
2004-03-25
Experiments
|
Simulations
Peer-2-Peer systems
z Client-Server systems
z
|
Performance measure
z
12/18
#ordered concurrent event pairs /
total #concurrent event pairs
ICDCS’04 Anders Gidenstam
2004-03-25
Experimental results
Peer-to-peer system 100 processes
13/18
ICDCS’04 Anders Gidenstam
2004-03-25
Experimental results
Client-server system 1 server 99 clients
14/18
ICDCS’04 Anders Gidenstam
2004-03-25
MinDiff timestamp sizes
Timestamp size
(byte)
System size
(#processes)
15/18
ICDCS’04 Anders Gidenstam
2004-03-25
Conclusions
|
Non-Uniformly Mapped R-Entries
Vector Clocks (NUREV)
z
z
z
|
|
A general class of logical clocks
Guaranteed to be plausible
Includes Lamport, Vector and REV clocks
Analysis of when and how NUREV clocks
order concurrent events
New NUREV clock algorithms
z
z
16/18
MinDiff and R-Others clocks
Improved performance at small timestamp
sizes
ICDCS’04 Anders Gidenstam
2004-03-25
Future Work
|
Apply NUREV clocks in a group
communication / ordered multicast framework
z
|
Further investigation of mapping functions
z
z
|
Work in progress
Subsets with constant size representation
Approximations
Bound the size of vector entries
17/18
ICDCS’04 Anders Gidenstam
2004-03-25
Questions?
|
Contact Information:
z
z
z
18/18
Address:
Anders Gidenstam /
Marina Papatriantafilou
Computing Science
Chalmers University of Technology
SE-412 96 Göteborg, Sweden
Email:
<andersg , ptrianta> @ cs.chalmers.se
Web:
http://www.cs.chalmers.se/~dcs/
ICDCS’04 Anders Gidenstam
2004-03-25
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising