[ntp:hackers] [Gpsd-dev] Single-writer/many-reader consistency

Eric Raymond esr at thyrsus.com
Sat Mar 26 22:57:04 UTC 2011

tz <thomas at mich.com>:
> One quick question - How large is this structure?  8k sounds extremely
> large.

7.9K.  Fixes are much smaller (120 bytes), but the structure contains
storage for other things.  Like a skyview - larger than you'd think,
becuause we've designed ahead for a GLONASS-friendly 72-satellite
limit in order to avoid an ABI break in the future. And there's a
union that can hold RTCM2 corrections, RTCM3 corrections and other
such stuff; RTCM3 is probably the worst offender at 5.7K.

A lot of this stuff can be conditioned out in an NMEA-only version.

> Also what are the chances of a CRC32 collision?

I don't know how to estimate that, because I don't know what the
distribution density function of that hash is.

>                     I've also
> noted an ECC block could fixup unsynced areas.

It could, but why add that complexity and potential bug load when
spinning back around to reread the shared segment is cheap?

> System semaphores are usually unlocked/destroyed/closed or whatever
> when a process closes (part of the close on exit or kill cleanup).

The resources get scavenged, les, but it's not clear to me what waiting
processes see when that happens.  And it's exactly the kind of thing where
I'd most expect platform and port bugs to be lurking.
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

More information about the hackers mailing list