🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Threads, Processes and the GIL: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. What does the GIL do in CPython?
  2. Q2. A program downloads 100 web pages. Which tool gives the easiest big speed-up?
  3. Q3. A program does heavy maths on large lists in pure Python. Which tool can use all CPU cores?
  4. Q4. What is a race condition?
  5. Q5. What does this print? (code)
  6. Q6. Does the GIL make balance = balance + 100 safe across threads?
  7. Q7. What does t.join() do for a thread t?
  8. Q8. What does this print? (code)
  9. Q9. Why must ProcessPoolExecutor code be inside if name == "main": on Windows?
  10. Q10. Which statement about threads and processes is correct?