

GIL is the mutex – mutual exclusion lock, which makes things thread safe. GIL never allows us to utilize multiple cores of CPU and hence we can say that there are no true threads in Python. While working with concurrent applications, there is a limitation present in Python called the GIL (Global Interpreter Lock). It facilitates much efficient utilization of devices of the computer system.Įliminating impact of global interpreter lock (GIL) Multiprogramming keeps several programs in main memory at the same time and execute them concurrently utilizing single CPU. Multiprocessing refers to processing of multiple processes at same time by multiple CPUs. The following table shows some of the important differences between them − Multiprocessing The main idea of multithreading is to achieve parallelism by dividing a process into multiple threads. It is the ability of a CPU to manage the use of operating system by executing multiple threads concurrently.


It is the best approach to get the full potential from our hardware by utilizing full number of CPU cores available in our computer system. It is the use of two or more CPUs units within a single computer system. In this chapter, we will focus more on the comparison between multiprocessing and multithreading.
