Boost logo

Boost :

From: Andy (atompkins_at_[hidden])
Date: 2007-05-08 09:53:59

<Oliver.Kowalke_at_[hidden]> wrote in

>> > 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.

This is not exactly true. The first step in their basic algorithm
(4.2.1) is to obtain a system-wide global lock. This lock ensures that
each guid has a different time stamp. Often an implementation strays
from the standard by adding in a process/thread/core number to avoid a
global lock. It also talks about an optimization (in that
allocates a block of time stamps at a time and a per-process generator
can allocate from that block until it is exhausted.

> 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.

< snip >

> Oliver


Boost list run by bdawes at, gregod at, cpdaniel at, john at