Re:Global Interpreter Lock, or how to kill it
by pnathan on Wednesday June 29, 2011 @07:34PM
(#2711804)
That sounds an awful lot like some bus contention schemes from the late 70s/80s. It's been a while since my grad class that covered that though, so I can't provide any citations.
I notice that we're still stuck in that time period insofar as real software innovations, sigh.
Re:Global Interpreter Lock, or how to kill it
by mattgreenrocks on Thursday June 30, 2011 @12:36AM
(#2712610)
It's also used in lock-free algorithms nowadays.
I remember being delighted by it when I first read about it. Rather than assume contention, it just deals with it only when it comes up. A refreshing change of mindset.
Re:Global Interpreter Lock, or how to kill it
by sandyklausner on Monday July 04, 2011 @09:49AM
(#2726529)
Yep, there is a seminal paper on this subject. Start by reviewing coretalk.net and directly contact me.
Basically if you have a system where contention is possible but unexpected, you 'tag in' before you start to do things that would be wrong if you did them in contention, and you 'tag out' when you're done. The system keeps track of a mutable state value which gets updated when state is mutated and the 'tag id' of the person who mutated it. When you tag out if you're the only tag id that has been mutating the system your done, otherwise the system resets your changes and you re-do. This 'wins' if most of the time you won't be contended. Its 'safe' because you always detect when it was contended and restart from a safe starting point. You don't 'roll back' generally because if you lost the tag race its because someone else "won" it and the new state is again consistent.
Surely there is some seminal paper on this somewhere.