[Python-Dev] Fixing the GIL (with a BFS scheduler) (original) (raw)

Lennart Regebro regebro at gmail.com
Mon May 17 08:28:08 CEST 2010


On Sun, May 16, 2010 at 22:52, Victor Stinner <victor.stinner at haypocalc.com> wrote:

I didn't followed last development around the GIL. Can you explain me why Python should have its own scheduler whereas each OS has already its own scheduler?

Because the GIL locks and unlocks threads, in practice, it already have. But the scheduler is so simplistic it ends up fighting with the OS scheduler, and a large amount of CPU time is used up switching instead of executing. Having a proper scheduler fixes this.

-- Lennart Regebro: Python, Zope, Plone, Grok http://regebro.wordpress.com/ +33 661 58 14 64



More information about the Python-Dev mailing list