There are two concepts in python, one is threading and the other one is the processor. In order to speed up the execution of the code in python, multi-threading package is used in python. Global Interpreter Lock (GIL) is a construct in python which ensures that only one thread is executed at a time while running the code.
The mode of operation of GIL is that a particular thread acquires the GIL, execution is done and then the GIL is passed into the next thread.
It may seem that the threads are executed in parallel, but, actually, each of the threads are executed singly and thus GIL adds to the overhead while execution of a particular programme.
It is a process of multi-threading using the CPU core by taking individual threads at a time. GIL should be used based on the context of the programming and the number of core processor present on the computer.
If You are interested in Computer Programming, You can mail to smartsubu2020@gmail.com.