Lets Talk About GIL!

  • English talk
  • Python Internals
  • Experienced

I will be talking about Global-Interpreter-Lock (GIL) in Python. It's a mutex that prevents multiple native threads from running in parallel. In essence, this says that a python program cannot do more than one thing at once via threading.

Talk Detail

There is a lot of misconception in the majority of Python Programmers regarding Global Interpreter Lock[1][2]. Most of them think its the worst part of Python. I will try to demonstrate how it actually works and how we can leverage multiple CPU cores for multithreading[3] for I/O and CPU Bound task using C-Extensions. I will also show some comparisons with different implementations of Python and the presence or absence of GIL in those, to answer questions like, why we can't just remove it from CPython and solve all our problems or why Jython performs better in Multithreading for CPU Bound task. [1] https://wiki.python.org/moin/GlobalInterpreterLock [2] https://en.wikipedia.org/wiki/Global_interpreter_lock [3] https://en.wikipedia.org/wiki/Multithreading_(computer_architecture)

Speaker Information

Amit Kumar

I am a Core Developer at SymPy, a Python Library for Symbolic Computation, which is used in scientific computing. I worked under Python Software Foundation in Google Summer of Code 2015 to improve the Solvers module of SymPy. I Mentored couple of students in Google Summer of Code 2016 for SymPy Project. I am also one of the Organisers at Python Delhi User Group and a volunteer for Python Conferences in and around India. I have spoken at various Python Conferences including PyCon UK 2016, PyGotham 2016, PyCon India 2016, PyCon Asia Pacific 2016, SciPy 2016, Austin and also at various local user group meetups in my City. All of my talks can be seen here: http://iamit.in/talks