Global Interpreter Lock: Episode III - cat < /dev/zero > GIL;

  • R1
  • Day 2, 14:05‑14:35
  • Chinese talk w. English slides
  • Best Practices & Patterns
  • Experienced

To simplify the work to do, CPython leverages a global big lock to serialize execution of threads. The big lock results in wasting computing power for lock contention in truly parallel environment and will become the bottleneck when the system getting larger.

In the previous work "Global Interpreter Lock: Episode I - Break the Seal" in PyCon APAC 2015[1], we focus on how to live along with CPython's GIL well. In this work, we are going to nullify the effects of GIL by giving each thread a private GIL.

Without modifications of the OS kernel and CPython, dynamic linker would be the easiest way to separate memory namespaces within a process. We will show examples on how to use it and discuss the limitations.

Talk Detail

References: \[1]:

Slides Link

Speaker Information

Tzung-Bi Shih

Tzung-Bi Shih is a searcher; he searches questions and answers. He is seeking answers for the question: whether modern operating systems can keep up with multiprocessor.

Tzung-Bi Shih is also a programming enthusiast. He is wondering how to quantize programs in readability and maintainability degrees. He thinks someday there will be a new type of programming: real-time programming for executing critical tasks.