Re: Give all devices on a serial IEC bus unique numbers?

From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2006-07-16 17:54:06

Hello Wolfgang,

welcome here in cbm-hackers. ;)

* On Sun, Jul 16, 2006 at 05:37:57PM +0200 I wrote:
 
> Don't know, if this is true, but I believe that 64'er once presented a
> prodecure where the numbers were given by the order in which the
> drives are switched on with the user's help .

Well, this would be trivial, wouldn't it?
 
> All in all, both timer2s reflect the time, when the drive was either
> switched to on or resetted last time.

This is true. Anyway, as they will drift away from each other, no matter
how good their clocks are synchronized, (thinking about a common power
connector, for example), I will have very good chances to get different
counter values which would be good candidates for a random number
generator.

Think about this:

1. Download program into the floppy

2. start it

3. Get the value of the free-running timer

4. Try to determine the RPM of the drive

5. get the value of the free-running timer again.


Even if two timers have the same value at 3., it is very unlikely they
will have the same value in 5. This is not because the is some activity
with the hardware in between (this is another factor, but I am
neglecting it), but because some seconds have elapsed, in which the
timers could have drifted.

For good clocks in PCs, a drift rate in the order of approx. 1*10^-5 is
considered a "good clock".

Now, assume there are exactly 3 seconds between 3. and 5. In this time,
two clocks will have drifted away by 3*10^-5 --> 30us, that is, 30 clock
ticks. Now, if the clocks are better (10^-6 comes to mind), it would
only be 3 clock ticks, which might not be noticeable - but, in this
case, I could just wait more seconds before re-trying.

Now, additionally, in 4., I have some hardware access. That should take
different times, depending on the current hardware, which might help me
some more.

> Then again, reading from the R/W head with no disk inserted also may
> produce true random bits with unknown statistical characteristics.

I'll have to check, this might be another good option!

 
> Would be cool, I don't have _any_ imagination, how such an
> nearest-drive-on-the-bus-gets-lowest-ID algorithm could work at all.

I already dumped the "nearest-gets-lowest-ID" completely. I don't think
this is possible without much more precise measurement characteristics.
Thus, having unique numbers at all will suffice, IMHO.

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
http://opencbm.sf.net/

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.