0% found this document useful (0 votes)
35 views8 pages

Kaku - Time and Global State Seminar

This document discusses time and global state in distributed systems. It introduces key concepts such as clocks, events, process states, clock synchronization, and constructing global states. Specifically, it covers synchronizing physical clocks through external and internal synchronization. It also discusses using "cuts" to assemble a meaningful global state from local states recorded at different times, despite the inability to perfectly synchronize physical time in a distributed system. Distributed debugging is provided as an example application for producing consistent cuts.

Uploaded by

kalayu yemane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views8 pages

Kaku - Time and Global State Seminar

This document discusses time and global state in distributed systems. It introduces key concepts such as clocks, events, process states, clock synchronization, and constructing global states. Specifically, it covers synchronizing physical clocks through external and internal synchronization. It also discusses using "cuts" to assemble a meaningful global state from local states recorded at different times, despite the inability to perfectly synchronize physical time in a distributed system. Distributed debugging is provided as an example application for producing consistent cuts.

Uploaded by

kalayu yemane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Aksum University Institute of Technology

Faculty of Computing Technology

Department of Information Technology

Master’s Program(Msc)

Distributed System

Program: Regular Year: 1 Semester: I

Title: - Time and Global State in Distributed system

Assignment type: Individual(seminar)

Prepared by: Kalayu Yemane

ID NO: AKU1603887

Submitted to: Dr. Mehammed A.

Axum, Tigray, Ethiopia

Junary,2024
Contents

1.Time and Global State..................................................................................................................3

1.1 Introduction............................................................................................................................3

1.2 Clocks events and process states............................................................................................3

1.3 Synchronizing physical clocks...............................................................................................5

1.4 Global states...........................................................................................................................6

1.5 Distributed debugging............................................................................................................8


1.Time and Global State

1.1 Introduction

This seminar topic introduce fundamental concepts and algorithm related to monitoring

distributed system as their execution unfold and to timing the event that occur in their execution.

Time is important and interesting issue in distributing system for several reason. First, time is a

quantity we often want to measure accurately in order to know events at what time it occur

particularly in computer necessary to synchronize its clock with external sources of time.

Second, Algorithms that depend up on clock synchronization useful for concurrency control

based on timestamp ordering and checking the authenticity of requests sent to server.

1.2 Clocks events and process states

We take distribute system to consist of collection P and N process where P i= i=1,2…N each

process executes on single processor and the processor do not share memory. Each process P i in

P has a state Si consisting of its variables (which it transforms as it executes). The process’s state

includes the value of all variable within it. Its state may also include the value of any object in its

logical operating system environment that it affects such as file. We assume that process cannot

communicate with one other in any one except by sending message through network. For

example, if the process operate robot arms connected to their respective node in the system, they

are not allowed to communicate by shaking one other’s robot hands.

As each process Pi executes it takes a series of action each of which is either a message sends or

receive or change own state Pi’s state on that change one or more of the value in Si. For example,

if the process in P are engaged in e-commerce application, then action may be one such as ‘client

dispatched order message’ or ‘merchant server recorded transaction to log’.

1|Page
The sequence of events within a single process Pi, can be placed in a single, total ordering which

we shall denoted by the relation →i between the events. i.e. e →ie’ if and only if the event e

occurs before e’ at Pi. this ordering is well defined whether or not the process is multi-threaded.

Since we have assumed that the process executes on single processor.

Now we can defined history of process Pi: is a series of events ordered by →i

history(pi)= hi=<ei 0, ei1, ei2, …>

Clock: We have seen order the event at process but not how to timestamp them, to assign to

them a date and time of day. Computer each contain their own physical clock. At real time, t, the

operating system reads the time on the computer’s hardware clock Hi(t) scale it and add on offset

so as to produce a software clock it calculates the time on its software clock Ci(t) = αHi(t) + β –

that approximately measure real, physical time t for the process Pi. if Ci behaves well enough, we

can use its value to timestamp any event at Pi. Note that successive events will correspond to

different timestamps only if the clock resolution, the period between update of the clock is

smaller than the time between successive event. The rate at which events occur depends on such

factor as the length of the processor instruction cycle.

Clock skew and clock drift.

Fig: Skew between computer clocks in a distributed system

Computer clocks are not generally in perfect agreement (see the figure above) the instances

different between the reading of any two clock is called skew. Also the crystal-based clock used

in computer are like any other clock subject to clock draft which means that they count time at

different rates and so diverge. A clock drift rate is the change in the offset (different reading)

2|Page
between the clock and nominal perfect references clock per unit of time measure by references

clock. For ordinary quartz clocks drift by about 1 sec in 11-12 days. (10-6secs/sec). The draft rate

of high precision quartz clocks drift rate is about 10-7or 10-8 secs/sec.

Coordinated Universal Time (UTC): UTC is an international standard for time keeping. The

most accurate physical clock uses atomic oscillators; whose drift rate is about one part in 10 -13.

The output of these atomic clock is used as the standard for elapsed real time known as

international atomic time. Seconds and years and other time units that we use are rooted in

astronomical time.

1.3 Synchronizing physical clocks

Refers to the process of aligning the time readings of multiple clocks or timekeeping devices to a

common reference or standard. We have two modes of synchronization more closely as follows,

overall an interval real time.

External synchronization: A computer’s clock Ci is synchronized with an external

authoritative time source. For synchronization bound D>0 and for a sources S of UTC time |S(t)-

Ci(t)|<D, for i=1, 2...N and for all real time t in I, another way of the clock Ci is accurate to

within bound D.

Internal synchronization: The clocks of a pair of computers are synchronized with one another

so that: –| Ci(t) -Cj(t)| < D for i, j= 1, 2, …N over an interval, I of real time –The clocks Ci and

Cj agree within the bound D. Internally synchronized clocks are not necessarily externally

synchronized, as they may drift collectively if the set of processes P is synchronized externally

within a bound D, it is also internally synchronized within bound 2D.

3|Page
Global states

It is often desirable to determine whether a particular property is true of a distributed system as it

executes. We'd like to use logical time to construct a global view of the system state and

determine whether a particular property is true. A few examples are as follows:

1) Garbage collection:

2) deadlock

3) Termination:

Figure: Detecting global properties

Cuts

Because physical time cannot be perfectly synchronized in a distributed system it is not possible

to gather the global state of the system at a particular time. Cuts provide the ability to "assemble

a meaningful global state from local states recorded at different times”. So here has some

definition: P is a system of N Processes Pi (i = 1, 2, ..., N) the series of events at each process and

that may have characterized the execution of each process by its history.

history(Pi)=hi=<ei0,ei1,ei2,…>, Similarly, consider any finite prefix of the process’s history

hik=<ei0,ei2,..eik>

 sikis the state of the process pi immediately before the kth event occurs

4|Page
 All processes record sending and receiving of messages. If a process pi records the

sending of message m to process pj and pj has not recorded receipt of the message, then m

is part of the state of the channel between pi and pj.

 A global history of ρ is the union of the individual process histories: H = h0 ∪h1 ∪

h2 ∪...∪hN-1

 A global state can be formed by taking the set of states of the individual processes: S =

(s1, s2, ..., sN)

1.5 Distributed debugging

To further examine how you might produce consistent cuts, we'll use the distributed debugging

example. Recall that we have several processes, each with a variable xi. "The safety condition

required in this example is |xi-xj| <= δ (i, j = 1, 2, ..., N).": this constraint is to be met even though

a process may change the value of its variable at any time.

The algorithm we will discuss is a centralized algorithm that determines post hoc whether the

safety condition was ever violated. The processes in the system, p1, p2, ..., pN, send their states to

a passive monitoring process, p0. p0 is not part of the system. Based on the states collected, p0 can

evaluate the safety condition.

Collecting the state: The processes send their initial state to a monitoring process and send

updates whenever relevant state changes, in this case the variable xi. In addition, the processes

need only send the value of xi and a vector timestamp. The monitoring process maintains an

ordered queue (by the vector timestamps) for each process where it stores the state messages. It

can then create consistent global states which it uses to evaluate the safety condition.

5|Page
Let S = (s1, s2, ..., SN) be a global state drawn from the state messages that the monitor

process has received. Let V(si) be the vector timestamp of the state si received from pi.

Then it can be shown that S is a consistent global state if and only if:

V(si)[i] >= V(sj)[i] for i, j = 1, 2, ..., N

6|Page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy