|
Boost : |
From: Oliver.Kowalke_at_[hidden]
Date: 2007-05-08 00:39:21
> > How useful can seed using MAC address + time be in system with
> > multiple cores? Shouldn't it be CoreID + time? Just image
> you have 16
> > cores and just one MAC address. Is such an assumption
> valid to make?
> You would need process/thread number + mac address + time
Hmm - the RFC 4122 doesn't tell anything about threads.
Version 1 UUIDs are generated according to the following algorithm:
o Determine the values for the UTC-based timestamp and clock
sequence to be used in the UUID, as described in Section 4.2.1.
o For the purposes of this algorithm, consider the timestamp to be a
60-bit unsigned integer and the clock sequence to be a 14-bit
unsigned integer. Sequentially number the bits in a field,
starting with zero for the least significant bit.
o Set the time_low field equal to the least significant 32 bits
(bits zero through 31) of the timestamp in the same order of
significance.
o Set the time_mid field equal to bits 32 through 47 from the
timestamp in the same order of significance.
o Set the 12 least significant bits (bits zero through 11) of the
time_hi_and_version field equal to bits 48 through 59 from the
timestamp in the same order of significance.
o Set the four most significant bits (bits 12 through 15) of the
time_hi_and_version field to the 4-bit version number
corresponding to the UUID version being created, as shown in the
table above.
o Set the clock_seq_low field to the eight least significant bits
(bits zero through 7) of the clock sequence in the same order of
significance.
o Set the 6 least significant bits (bits zero through 5) of the
clock_seq_hi_and_reserved field to the 6 most significant bits
(bits 8 through 13) of the clock sequence in the same order of
significance.
o Set the two most significant bits (bits 6 and 7) of the
clock_seq_hi_and_reserved to zero and one, respectively.
o Set the node field to the 48-bit IEEE address in the same order of
significance as the address.
Oliver
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk