Assign1 - Armin Tavakoli Naeini (StudenID:260414299)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Armin Tavakoli Naeini (StudenID:260414299) Exercise 1:Time 1. (a) Since the time received by process P from the server is t=10 : 54 : 23 : 674 and t round-trip =24 ms, we can find the time that P should be set to (t p ) from this formula: t p = t + t round-trip /2 => t p = 10 : 54 : 23 : 686 (hr : min : sec : ms) (b) The accuracy is determined from the following formula: +/- (t round-trip /2 -min). So in this case in which the min time is 3 ms would be +/- (12 – 3) = +/- 9 ms. (c) Since the Process’s time is more than the time to which we want to set , we can not set back the clock because some applications (like ±²³´ in Linux) could timestamp events under the assumption that clocks always advance. (actually the process P’s clock is 319 ms fast) (10 : 54 : 24 : 005) - (10 : 54 : 23 : 686) = 319 ms In our case we have the errant clock, let’s call it E and the hardware clock H (which is supposed to advance at a perfect rate). Now we can construct a software clock ( S ) for the process P such that for example after x milliseconds we can replace the errant clock with the software clock in good conditions: S= c (E-T) + T , where T = 10 : 54 : 24 : 005 and c is to be found . We know that when E = T + x then S should be: S= T + 319 ms (because we want the S clock to be corrected after the determined time of x ms) so we have: T+319 = c(T+ x - T) +T => c = 319/x . (note that we have the value of x ). So we reach the following formula for S: S= 319/x (E-T) + T (when T <= E <= T+x) 2. With Lamport clocks, nothing can be said about the relationship between two events a and b
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2011 for the course ECE 6161 taught by Professor Khkjk during the Winter '10 term at Concordia Canada.

Page1 / 6

Assign1 - Armin Tavakoli Naeini (StudenID:260414299)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online