[ntp:hackers] [Gpsd-dev] A lightweight synchronization mechanism for shared memory

Dave Hart davehart at gmail.com
Fri Mar 25 12:19:24 UTC 2011

On Fri, Mar 25, 2011 at 04:05 UTC, tz <thomas at mich.com> wrote:
> u8 is likely to be atomic in all cases.

My recollection is that MIPS R4000, Alpha, or both do not support
byte-wide access, instead emitting load aligned destination word into
register, twiddle the byte into the register, then store aligned
destination word.  By "word" I mean unsigned int, essentially, or
possibly 32-bit on 64-bit processors.

Chris Torek's 2005 newsgroup posting seems to confirm and comments
similarly on SPARC:

On Fri, Mar 25, 2011 at 10:23 UTC, Terje Mathisen <terje at tmsw.no> wrote:
> PS. Bookend coherence is elegant, but still not a solution, see my other
> post. For ntpd as a client it is however almost certainly sufficient, since
> ntpd has a _lot_ of sanity checking & filtering code, so a spurious entry
> does not matter.

I've heard that sort of reasoning from a number of ntpd contributors
in different contexts, and each time it makes me uncomfortable.  I
believe ntpd's grooming of its inputs should not be relied upon to
excuse to occasionally feed it garbage because it's convenient.  The
grooming has a job to do which is undermined by avoidable garbage, and
intentional noise is not budgeted.

Dave Hart

More information about the hackers mailing list