Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[RubyConf.tw 2014] Cores unleashed - Exploiting...

[RubyConf.tw 2014] Cores unleashed - Exploiting Parallelism in Ruby with STM

Szu-Kai Hsu (brucehsu)

April 26, 2014
Tweet

More Decks by Szu-Kai Hsu (brucehsu)

Other Decks in Programming

Transcript

  1. “Global Interpreter Lock is a mechanism used in computer language

    interpreters to synchronize the execution of threads so that only one thread can execute at a time. An interpreter which uses GIL will always allow exactly one thread to execute at a time, even if run on a Multi-core processor. Some popular interpreters that have GIL are CPython and Ruby MRI.” http://en.wikipedia.org/wiki/ GlobalInterpreterLock
  2. Beautiful Concurrency, Simon Peyton Jones 2007 1.Taking too few locks

    2.Taking too many locks 3.Taking the wrong locks 4.Taking locks in the wrong orders 5.Error recovery 6.Lost wake-ups and erroneous retries
  3. Why Go? And I say, why not? » Easier to

    write » Good performance » Growing community and resources » Goroutines and channels » Go is for Hipsters