Python: Which statement about Global Interpreter Lock (GIL) is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about Global Interpreter Lock (GIL) is the strongest interview answer?

  1. In CPython, the GIL means only one thread executes Python bytecode at a time inside one interpreter process.
  2. Global Interpreter Lock (GIL) is mostly a naming style choice and has little effect on runtime behavior or design tradeoffs.
  3. Global Interpreter Lock (GIL) exists mainly to reduce the number of files in a Python project.
  4. Global Interpreter Lock (GIL) matters only for frontend scripting and not for backend or automation code.

Hint

Start with the core rule behind Global Interpreter Lock (GIL).

Answer and rationale

Correct answer: A. In CPython, the GIL means only one thread executes Python bytecode at a time inside one interpreter process.

In CPython, the GIL means only one thread executes Python bytecode at a time inside one interpreter process. This is the base concept interviewers commonly test first.

Track: Python