Content area

Abstract

CPython’s Global Interpreter Lock (GIL) has been a long-standing performance bottleneck for the Python programming language, forcing Python threads to run one at a time and preventing real shared memory parallelism in Python programs. Recently, the Python Steering Council has accepted Python Enhancement Proposal (PEP) 703, which aims to eliminate the GIL and bring real multithreading to CPython for the first time. An experimental “free-threaded” version of CPython implementing PEP 703 is now being actively developed by the core CPython team. 

This thesis describes our efforts to characterize the memory model of free-threaded CPython. We argue that as a consequence of the GIL, CPython has historically enforced an extremely strong memory model, Sequential Consistency (SC), and that the implementers of PEP 703 must be careful to maintain backwards compatibility with this memory model. We use litmus tests to examine the memory consistency guarantees free-threaded CPython offers to Python programs, and we apply a simple form of mutation testing to free-threaded CPython to validate our litmus testing approach. While we find that free-threaded CPython currently preserves SC, we believe that the testing methodology we develop in this thesis can be used to ensure adherence to SC for future versions of free-threaded CPython as well. 

Details

1010268
Title
Litmus Testing CPython Without the Global Interpreter Lock
Number of pages
96
Publication year
2025
Degree date
2025
School code
0799
Source
MAI 86/12(E), Masters Abstracts International
ISBN
9798280767164
Advisor
Committee member
Mansky, William; Eriksson, Jakob
University/institution
University of Illinois at Chicago
Department
Computer Science
University location
United States -- Illinois
Degree
M.S.Comp.Sci.
Source type
Dissertation or Thesis
Language
English
Document type
Dissertation/Thesis
Dissertation/thesis number
32153926
ProQuest document ID
3222457934
Document URL
https://www.proquest.com/dissertations-theses/litmus-testing-cpython-without-global-interpreter/docview/3222457934/se-2?accountid=208611
Copyright
Database copyright ProQuest LLC; ProQuest does not claim copyright in the individual underlying works.
Database
ProQuest One Academic