Sunday, July 12, 2020

What is GIL in python?

Impact of Artificial Intelligence


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.

 

SMART SUBU

Author & Editor

Prof. (Dr) Subroto Chowdhury is a Data science and Technology Enthusiast, Independent Research Practitioner, Education Change Motivator, Ethical Investment Advisor and Analytics Consultant.Analytical Exposition interests him as an instrumentation process to make objective understanding of the complex Phenomenon and other decisions. He believes in making education more affordable, easy and pragmatic.

To Know More Click Here