educative.io

Confusion about the descriptions and spot a typo

In the Python Interpreter section, for the sentence :’ Two threads on a machine with two available processors can’t be executed in parallel each running on a single CPU.’ Do you mean ’ Two threads on a machine with two available processors can’t be executed in parallel unless each running on a single CPU.’ ?

Also in this section, may I ask why ‘This design has direct consequences on the performance of CPU bound programs since they don’t experience any speed-up in the presence of additional processors.’ As from my understanding, more processor can make your program run in parallel, which indeed improve the speed.

Yeah, multithreading in python can increase the speed. But using a threading module in python can reduce the speed and can affect its performance. This is because of the reason that we’ve to deal with GIL which limits the one thread to run at a time.