DSSSB TGT CS Mock 03 – Question 179

Question:

In Python, what is the Global Interpreter Lock (GIL)?
पायथन में ग्लोबल इंटरप्रेटर लॉक (GIL) क्या है?

Options:

  • A mutex that allows only one native thread to execute Python bytecode at a time in CPython
  • A security sandbox that prevents unauthorized file access
  • A database connection lock for multi-threaded SQLite access
  • A compiler optimization that vectorizes loops
  • एक म्यूटेक्स जो CPython में एक समय में केवल एक थ्रेड को पायथन बाइटकोड निष्पादित करने की अनुमति देता है
  • एक सुरक्षा सैंडबॉक्स
  • डेटाबेस कनेक्शन लॉक
  • लूप ऑप्टिमाइज़ेशन तकनीक

Correct Answer: a)

Explanation:

In CPython, the GIL is a mutual-exclusion lock used to synchronize thread execution and manage reference counting memory safety, preventing multiple CPU cores from executing Python bytecode simultaneously within a single process.
CPython का GIL एक म्यूटेक्स लॉक है जो मेमोरी सुरक्षा के लिए एक समय में केवल एक थ्रेड को पायथन बाइटकोड चलाने की अनुमति देता है।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top