0

My question is why does running concurrently reduces execution time(compared to the sequential run of tasks in one thread)?

As every process has a CPU time, it is only possible if the CPU time is increased when multiple threads are created and are being run concurrently.

If not, whatever CPU time we have will be divided among the number of threads making the runtime ~ sequential running of all the tasks defined in threads.

is it correct?

Thanks

lynxx
  • 544
  • 3
  • 18
  • Modern CPUs are mutlicore. See https://en.wikipedia.org/wiki/Multi-core_processor – manuell May 11 '20 at 14:02
  • Furthermore, even with a single core CPU, one thread may be blocked, waiting for IO, while another one may be doing useful work in the meantime. – manuell May 11 '20 at 14:05

0 Answers0