Oleg Zabluda's blog
Friday, September 21, 2012
52 Hertz whale (via Savva Pavlov)
52 Hertz whale (via Savva Pavlov)
http://blogs.discovery.com/animal_news/2012/05/52-hertz-the-loneliest-whale-in-the-world.html
http://earthsky.org/earth/52-hertz-song-of-worlds-loneliest-whale
http://blogs.discovery.com/animal_news/2012/05/52-hertz-the-loneliest-whale-in-the-world.html
Labels: Oleg Zabluda
Many C/C++ developers are losing sleep over a simple question: modulo data races and other undefined behavior, is it...
Many C/C++ developers are losing sleep over a simple question: modulo data races and other undefined behavior, is it possible for both asserts not to trigger:
int x;
x=0; // maybe in the other thread, assume sync
x=1; // maybe in the other thread, assume sync
assert(x==1);
assert(x==0);
In single-threaded programs, it was never possible (program order). But in multithreaded, anything was possible. Before 2011 that is.
You may be glad to know that both C11/C++11 guarantee that, from now on, what has been seen, can not be unseen or, more succinctly, you can't unsee the horror. If you saw x==1, you can't unsee it and see the older value x==0.
http://knowyourmeme.com/memes/what-has-been-seen-cannot-be-unseen
Until such time when such simple explanations are routinely put into the standards, you have to get by with just as clear standartese:
============================
SO/IEC 14882:2011 aka C++11:
1.10 Multi-threaded executions and data races
13. A visible side effect A on a scalar object or bit-field M with respect to a value computation B of M satisfies the conditions:
— A happens before B and
— there is no other side effect X to M such that A happens before X and X happens before B.
The value of a non-atomic scalar object or bit-field M, as determined by evaluation B, shall be the value stored by the visible side effect A.
=====================
ISO/IEC 9899:2011 aka C11 has a similar language:
5.1.2.4 Multi-threaded executions and data races
19. A visible side effect A on an object M with respect to a value computation B of M satisfies the conditions:
— A happens before B, and
— there is no other side effect X to M such that A happens before X and X happens before B.
The value of a non-atomic scalar object M, as determined by evaluation B, shall be the value stored by the visible side effect A.
=====================
P.S. Inspired by Matt Austern's C++11 series of posts, but his needs more cats.
Labels: Oleg Zabluda
Everybody remembers from superluminal neutrinos incident discussion that Common Mode GPS clocks can be synced to 1ns...
Everybody remembers from superluminal neutrinos incident discussion that Common Mode GPS clocks can be synced to 1ns by professional metrologists.
Some may remember that Eric Raymond in these posts
https://plus.google.com/108967323530519754654/posts/28qjwDMfEs2
https://plus.google.com/108967323530519754654/posts/N1LhajeFQR8
found some $35 commercial GPS chips that claim to have 1PPS output with 50 ns jitter. I don't know if anybody actually verified it yet.
But this post about Spanner, finally made me go look for some hard data, and the best I found (after a brief search) is a 2005 NIST article:
"Characterizing the Performance of GPS Disciplined Oscillators with Respect to UTC(NIST)"
http://www.dtic.mil/cgi-bin/GetTRDoc?AD=ADA484160
Another data point:
CDMA system time is the same as GPS time and requires that base stations be synchronized to GPS time to less than 10 microseconds, even during periods of GPS satellite unavailability lasting up to 8 hours. Then CDMA rebroadcasts the time, and its coordinates.
http://www.dtic.mil/dtic/tr/fulltext/u2/a486210.pdf
http://en.wikipedia.org/wiki/Precision_Time_Protocol
Originally shared by Jeff Dean
Spanner: Google's Globally-Distributed Database
I and many others have been working for the last few years on building a large-scale storage system that can manage data across all of Google's datacenters. This system underlies Google's advertising system, among other products. We'll be presenting a paper describing the system (with 26 co-authors!) at OSDI 2012 next month. We've now put up a web page with a link to the PDF of the final version of the paper.
Feedback is welcome, of course.
Here's the abstract of the paper:
Spanner is Google's scalable, multi-version, globally-distributed, and synchronously-replicated database. It is the first system to distribute data at global scale and support externally-consistent distributed transactions. This paper describes how Spanner is structured, its feature set, the rationale underlying various design decisions, and a novel time API that exposes clock uncertainty. This API and its implementation are critical to supporting external consistency and a variety of powerful features: non-blocking reads in the past, lock-free read-only transactions, and atomic schema changes, across all of Spanner.
http://research.google.com/archive/spanner.html
Labels: Oleg Zabluda
Shuttle flyover
Shuttle flyover
Video:
https://plus.google.com/112065430692128821190/posts/H6LjVjdiwS4
Labels: Oleg Zabluda