[UbuntuWomen] regarding for solution
Jacinta Richardson
jarich at perltraining.com.au
Wed May 16 14:43:34 UTC 2007
G'day Fatma,
> I have one problem....I couldnt find right answer...do you have any idea?
> please please let me know
This looks more like a homework question than anything to do with Ubuntu or
women in Ubuntu. Nevertheless I'll give you some ideas.
> "........Consider the behaviour of two machines in a distributed system.
> Both have clocks that are supposed to tick 1000 times per millisecond. One
> of them ticks 990 times per millisecond. The other ticks 1015 times per
> millisecond. If the system designer want to guarantee that clocks of these
> two machines never differ by more than 5 seconds, how often must be clocks
> be re-synchronized? Supposing that all machines in this distributed systems
> come from same manufacturer and the maximum drift rate is specified as 1.0%,
> how often must the clocks of this system must be re-synchonized if the
> system designers want to guarantee that clocks of these two machines never
> differ by more than 5 seconds? Describe in steps how you get your
> result......."
Let's consider this in a brute force sense. What happens if we re-synchronise
every 1 second? That'll be every 990,000 ticks for the first and 1,01,5000 ticks
for the second. Obviously if we're re-synchonising every second then they'll
never differ by more than 5 seconds.
What if we re-synchronise after every 10 seconds? That'll be 9,900,000 ticks
(short by 100,000) for the first clock and 10,150,000 ticks (too many by 150,000
ticks) for the second clock. At 1,000,000 ticks a second that means the first
clock is only 1/10 of a second behind real time while the second clock is only
15/100 seconds ahead. Thus they're not even a full second apart, again this is
too frequent.
What if we re-synchronise after every 100 seconds?
First clock: 99,000,000 ticks (1,000,000 ticks (1 second) behind)
Second clock: 101,500,000 ticks (1,500,000 ticks (1.5 seconds) ahead)
Difference between first and second clock: 2.5 seconds.
1000 seconds gets us:
First clock: 990,000,000 (10,000,000 (10 seconds) behind)
Second clock: 1,015,000,000 (15,000,000 (15 seconds) ahead)
Difference between first and second clock: 25 seconds
Thus, you'll need to re-synchronise somewhere between every 100 and 1000
seconds. I'll let you work out the exact number.
I hope this helps.
Jacinta
More information about the Ubuntu-Women
mailing list