-2

The GUID algorithms produces algorithms starting from 3 value:

  • the MAC address of your network card
  • the current timestamp with a resolution of 100 nanoseconds
  • something called "clock sequence": based on the RFC of GUID this value is incremented when the clock is set backward or if the timestamp is not changed from the last GUID generation.

So, how does the GUID algorithms handle the "clock sequence"? Is it maybe a hardware mechanism? Is it a tread and process safe software routine? What happen when computer will have the computational power to produce so many GUID per 100 nanoseconds to reset the "code sequence"? Maybe is not so far the day when the GUIDs become obsoletes..

optimusfrenk
  • 1,271
  • 2
  • 16
  • 34

1 Answers1

0

The implementation is free to anyone who writes it. You won't get an answer on SO for every language/compiler/library which provides GUIDs.

From RFC4122:

If the previous value of the clock sequence is known, it can just be incremented; otherwise it should be set to a random or high-quality pseudo-random value.

So the most developers just choose the latter.

The clock-is-set-backward is just the reason for the clock sequence. The clock sequence isn't linked to the hardware clock or anything like it.

Community
  • 1
  • 1
Stefan M
  • 868
  • 6
  • 17