Slashdot Mirror


Schrödinger's Cat and RCU (Well, Structured Procrastination, Actually)

davecb writes "Paul E. McKenney, one of the Linux RCU implementors, addresses the problem of synchronization using structured deferral on, what else, Mr Schrödinger's famous cat. Courtesy of deferral/procrastination, the cat can be both alive and dead at the same time. 'In this example, Schrödinger would like to construct an in-memory database to keep track of the animals in his zoo. Births would of course result in insertions into this database, while deaths would result in deletions. The database is also queried by those interested in the health and welfare of Schrödinger's animals. Schrödinger has numerous short-lived animals such as mice, resulting in high update rates. In addition, there is a surprising level of interest in the health of Schrödinger's cat, so much so that Schrödinger sometimes wonders whether his mice are responsible for most of these queries. Regardless of their source, the database must handle the large volume of cat-related queries without suffering from excessive levels of contention. Both accesses and updates are typically quite short, involving accessing or mutating an in-memory data structure, and therefore synchronization overhead cannot be ignored.'"

43 comments

  1. Huh? by cultiv8 · · Score: 4, Insightful

    I feel like this submission was generated by SCIgen.

    --
    sysadmins and parents of newborns get the same amount of sleep.
    1. Re:Huh? by dmbasso · · Score: 1

      Thanx, I feel relieved now... I thought I was the only one that felt like on drugs while reading the summary.

      --
      `echo $[0x853204FA81]|tr 0-9 ionbsdeaml`@gmail.com
    2. Re:Huh? by Dahamma · · Score: 4, Informative

      The summary is completely unintelligible because it does an absolutely ridiculous job of quoting TFA. TFA, on the other hand, is actually a fairly interesting read... IMO go read the article and skip any slashdot summary or comments and you will be wiser for it.

    3. Re:Huh? by Lodlaiden · · Score: 1

      ... IMO go read the article and skip any slashdot summary or comments and you will be wiser for it.

      Oh, for mod points!

      --
      Suborbital [spaceflight] is the special olympics of spaceflight. - Rei
    4. Re:Huh? by davecb · · Score: 1

      For some reason it got longer than what I had tried to post... --dave

      --
      davecb@spamcop.net
  2. So simple now! by GlobalEcho · · Score: 5, Funny

    I know! Let's explain the workings of a deterministic computational system using analogies to quantum mechanics! Everyone find quantum mechanics clear and intuitive.

    // Advanced degrees in physics and math
    /// Still find article unclear
    //// Reference counting makes sense already

    1. Re:So simple now! by blue+trane · · Score: 1

      You can take a MOOC on quantum physics. No need to remain ignorant...

    2. Re:So simple now! by Anonymous Coward · · Score: 0

      A student can take a course on quantum physics and still remain ignorant of it, as anyone who has taught such a course can testify.

    3. Re:So simple now! by GlobalEcho · · Score: 1

      You can take a MOOC on quantum physics. No need to remain ignorant...

      In my opinion, the only people who can learn much from a MOOC are N00Bs.

      (I'm being flippant, but give me a break. A MOOC in quantum physics, without underlying groundwork sufficient to understand, say, what a Hamiltonian is, couldn't possibly yield more than a superficial picture.)

    4. Re:So simple now! by nightcats · · Score: 2

      Oh, I did worse than that! I tried to prop up an entire cosmology with the same metaphor.

      --
      Development is programmable; Discovery is not programmable. (Fuller)
    5. Re:So simple now! by Anonymous Coward · · Score: 0

      While the CPU may technically be deterministic, in practical terms it makes more sense to treat it as non-deterministic, as any given thread has no idea what other threads are doing or when.

    6. Re:So simple now! by blue+trane · · Score: 2

      I took the Berkeley Quantum Computation MOOC through Coursera, taught by Umesh Vazirani, twice. First time I maybe got half of what was in it (though I passed, barely); second time maybe 70% (again barely passing; homeworks and tests had mostly different problems). I learned to manipulate Hamiltonians in Octave to find their eigenvectors and eigenvalues, for example. So now I have a better sense of the math used to describe a superposition state, and I feel better informed about current models and ways of thinking about quantum phenomena such as superposition and entanglement.

      The current Coursera MOOC "Exploring Quantum Physics" involves a lot more math. Most of it goes over my head, but still there are some basic concepts that I can grasp; and just seeing the math laid out is somewhat helpful to know what it looks like and have some sense of how it's being used.

      In conclusion, the MOOCs on quantum computation/physics have helped me develop a better understanding of the mathematics behind the models. So I feel more informed than I was before, approaching the subject simply from a philosophical viewpoint. Yes, I'm a "N00B", but so was the poster I was replying to; now I'm a little less ignorant.

    7. Re:So simple now! by Visserau · · Score: 1

      Do these courses have some references/a question forum/anything helpful other than a recorded lecture? Are any of these still active?

      I've done the first few lectures of a series from Stanford, and am having a bit of trouble. There is no supporting material, but the lecturer appears to be relying on tutorials/etc to fill in a lot of the detail. It doesn't help much that he often makes mistakes which aren't pointed out by the students until later. I have been filling in gaps with google (and a lot of pausing) but I feel like I could do a lot better if I had the ability to ask a few questions which can't be googled.

      So far we've covered the topics the parent mentioned - hamiltonians and eigenvectors/values. I kind of just picked this course out of a hat as it seemed a somewhat reasonable place to start. Can anyone recommend a useful course or resource for this kind of stuff, or an alternative entry point?

    8. Re:So simple now! by blue+trane · · Score: 1

      The forums for the class are an excellent resource. Often other students can explain things better than the instructors, because the instructors are so familiar with the material they forget what is confusing about it to someone learning it.

      The edx quantum computation class will be offered again, not sure when. The Coursera "Exploring Quantum Physics" class is finishing this week, but will likely be offered again.

      There may be others, you can check coursera's and edx's sites...

    9. Re:So simple now! by Visserau · · Score: 1

      Yeah I had a look through the Coursera web site and was actually able to sign up to the class, since the exam isn't actually finally due until tomorrow morning. So I guess I'll at least download the reference materials and see if they help any :)

      The course I've mentioned is here: http://theoreticalminimum.com/courses/quantum-mechanics/2012/winter . I've heard good things about it and I suspect it is probably one of the more in depth classes, but it is not for the feint of heart. I'm probably doing myself a disservice by trying to jump into the middle of QM skipping over a few maths classes along the way :)

      Courera seems much nicer, so I'll keep an eye out (and will look into edx). Unfortunately there isn't anything super relevent starting soon, but there is one on realtivity that has a week or two left. If anyone is interested, there is a large directory of courses here: http://www.openculture.com/

    10. Re:So simple now! by Anonymous Coward · · Score: 0

      And the best part is the realization that you will never understand physics.

      Not with your weak math skills.

  3. Tricks of the journal paper authors by Anonymous Coward · · Score: 0

    Problem: how to package your paper so you get that all-expenses paid invite to the conference in Nice, France, and get a crowded lecture hall when it's your turn to present.

    Mr. McKenney's first attempt, "In-Memory Data Store Consistency in the presence of Heavy Concurrent Loads", failed miserably. But he didn't stop there.

    1. Re: Tricks of the journal paper authors by Anonymous Coward · · Score: 0

      Amen. Fucking math hipsters.

    2. Re:Tricks of the journal paper authors by rusty · · Score: 1
      Heheh... I doubt Paul needs an all-expenses paid trip, given how senior he is at IBM.

      The article is well worth a read: hell, I've implemented RCU myself, and I learned by reading it.

      Hope that helps!
      Rusty.

  4. Slashdot Translation by VortexCortex · · Score: 5, Funny

    Slashdot Translation: It's similar to how an article exists in a superposition of both interesting and uninteresting at the same time, so long as no one reads it. Rather than RTFA and collapse the superposition, we can simply read the quantumly entangled comments to determine the degree of interest in accordance with our groupthink.

    1. Re:Slashdot Translation by newcastlejon · · Score: 1

      When I read the summary my cognitive wave function collapsed into "bafflement". I dare not RTFA, lest I lose the tenuous grasp of reality I have left.

      --
      If God forks the Universe every time you roll a die, he'd better have a damned good memory.
    2. Re:Slashdot Translation by Anonymous Coward · · Score: 0

      You're really really close to being correct. Except here, replace the cat with slashdot's popularity. I say it's dead, but then here we are, commenting... Shit's hard to figure out, even after you open the box. In this way, the cat's opening it's mouth, blinking eyes... but there is no heart beat...

    3. Re:Slashdot Translation by Anonymous Coward · · Score: 0

      That's the problem with most people today. They hardly can handle comprehending reality. So they flee into (religious) delusions and ignorance.
      I find it pretty cool that you didn't. There's no shame in not knowing something. The shame is in thinking one knows it anyway,. and being all over-confident about it.
      Unfortunately, because of the Dunning-Kruger effect, such people normally do not know that they don't know it either!
      Which leads me to hypothesize that you're quite a bit more intelligent than you say/think you are.

      Also: No, quantum physics really is not that hard to understand. You just have to go at the right speed. I see no reason why you shouldn't be able to understand it too. Especially with how cool and fun its concepts are.

    4. Re:Slashdot Translation by Lodlaiden · · Score: 1

      Always have to be bringing it back to zombies. This is the first time I've heard Schrodinger blamed for the end of humanity though.

      --
      Suborbital [spaceflight] is the special olympics of spaceflight. - Rei
  5. This had to be done by Anonymous Coward · · Score: 3, Funny

    He can be both ignorant and knowledgeable at same time until measured.

    And if in an entangled pair of students one just copies notes off other, measuring one of them will immediately collapse the wave function of another.

    1. Re:This had to be done by K.+S.+Kyosuke · · Score: 1

      He can be both ignorant and knowledgeable at same time until measured.

      Many students feel both ways simultaneously even after taking the exam. I know I did!

      --
      Ezekiel 23:20
  6. Always wondered how Schroedinger ... by quax · · Score: 1

    ... would feel about the fact that his cat became a household name to illustrate quantum weirdness.

    After all he created that thought experiment to mock the Copenhagen Interpretation. He was severely unhappy with the latter, and argued against it in his article on the meaning of wave mechanics.

    1. Re:Always wondered how Schroedinger ... by Livius · · Score: 2

      Schrödinger's whole point was that for a macroscopic system as complex as a cat to be simultaneously alive and dead was obvious nonsense, and therefore there was something still missing in our understanding of quantum mechanics.

      Ironically, the outcome was people agreeing that quantum weirdness is, well, weird, but simultaneously believing he was talking about a cat actually being both alive and dead.

    2. Re:Always wondered how Schroedinger ... by quax · · Score: 2

      So probably he turning in his grave with a spin 1/2 :-)

    3. Re: Always wondered how Schroedinger ... by Anonymous Coward · · Score: 0

      Lol

    4. Re:Always wondered how Schroedinger ... by blue+trane · · Score: 1

      Schroedinger was a mystic. Read some of his quotations about Nirvana and Hinduism at http://en.wikiquote.org/wiki/Erwin_Schr%C3%B6dinger

      Here's a sample:

      The observing mind is not a physical system, it cannot interact with any physical system. And it might be better to reserve the term "subject" for the observing mind. ... For the subject, if anything, is the thing that senses and thinks. Sensations and thoughts do not belong to the "world of energy."

      Another sample:

      The world is given to me only once, not one existing and one perceived. Subject and object are only one. The barrier between them cannot be said to have broken down as a result of recent experience in the physical sciences, for this barrier does not exist.

      Another:

      Nirvana is a state of pure blissful knowledge... It has nothing to do with the individual. The ego or its separation is an illusion. Indeed in a certain sense two "I"'s are identical namely when one disregards all special contents -- their Karma. The goal of man is to preserve his Karma and to develop it further... when man dies his Karma lives and creates for itself another carrier.

      Andrew Cleland and Aaron O'Connell have recently done experiments putting a macroscopic object in a superpositional state.

      O'Connell's PhD dissertation: http://web.physics.ucsb.edu/~martinisgroup/theses/OConnell2010.pdf

      In O'Connell's words, from http://www.nature.com/nature/podcast/v464/n7287/nature-2010-03-18.html:

      the swing both swings back and forth and stays perfectly still at the same time.

      In conclusion: 1) Schroedinger had mystical beliefs, which is relevant when you bring up his ulterior motives for the "cat" analogy; 2) modern experiments demonstrate superposition on a macroscopic scale.

  7. Translation by Anonymous Coward · · Score: 0

    Having implemented some RCU code in projects myself, I think I might be of help translating.

    The whole reference to Schrodinger's cat is in relation to the state of a list when multiple readers are moving across it while multiple writers are deleting elements (or killing cats). Some readers may see the cat as dead, and some alive. We say that readers may not agree. This is for RCU - the competing sychronization primitive Hazard Pointers ensures all readers agree, but this feature is rarely a requirement for most data structures.

  8. I have observed this article by SpaceLifeForm · · Score: 1

    And still have not determined it's state.

    --
    You are being MICROattacked, from various angles, in a SOFT manner.
    1. Re:I have observed this article by Anonymous Coward · · Score: 0

      I did, and it is not a state.

  9. Proposed solution to the Cat problem by wvmarle · · Score: 1

    Key of the problem is that we can not know whether the cat is dead or alive without looking at it. Poor cat. But could we maybe determine the dead/alive state of the cat indirectly? For example by looking at the death rates of the mice? After all, when the cat is alive mice will die. So by just looking at the death rate of mice we can tell the cat is alive or dead, without looking at the cat directly. And as we never look at the cat directly it will remain dead and alive forever, without being forced in one of its quantum states "dead" or "alive". And in the meantime we actually know whether the cat is alive or dead, without the cat itself knowing. Meaning it can live forever.

    Makes sense? No more than the submission to me... Oh well.

    1. Re:Proposed solution to the Cat problem by ultranova · · Score: 1

      Key of the problem is that we can not know whether the cat is dead or alive without looking at it. Poor cat. But could we maybe determine the dead/alive state of the cat indirectly? For example by looking at the death rates of the mice?

      How is this any more indirect than looking at the photons reflecting from the cat? Which you also don't observe directly, BTW: you observe the chemical reactions they cause in your eyes. Or, if we want to get really specific: photons reflect from the cat and cause chemical reactions in your eyes, which cause nerve pulses, which cause changes in the state of your visual cortex, which causes changes in the state of your cerebral cortex, which you observe as the thought "the cat is dead" or "the cat is alive".

      There is no such thing as direct observation in physics.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  10. tile by Anonymous Coward · · Score: 0

    It's Professor Schrödinger for you, not Mr. Schrödinger.

  11. No. by mcmonkey · · Score: 1

    Just no.

    While births indeed should mean insertions in to the database, deaths should not be deletions. They should be updating the Living flag to 'N' and populating the Date of Death and Cause of Death fields.

    They're going to want reports and stats not just on the current living animals. I didn't RTFA ('natch) but if they missed that requirement, what else have they overlooked?

    1. Re: No. by Anonymous Coward · · Score: 1

      I think you took the metaphor too seriously. The whole point is he wants to free memory while maintaining coherent state across threads. He proposes three solutions of increasing "subtlety", though none of them appear novel.

    2. Re:No. by Jeremi · · Score: 2

      They're going to want reports and stats not just on the current living animals. I didn't RTFA ('natch) but if they missed that requirement, what else have they overlooked?

      I think what you overlooked was that the "database" in the article was just a colorful contrivance to illustrate common usages of an in-memory data structure (e.g. a page-table in the Linux kernel) and not a True Database in the SQL/web-server/generate-me-a-report sense.

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
  12. Idiot summary + idiot comments by Anonymous Coward · · Score: 0

    RTFA anyone?