5

I know that the in apparent concurrency , multiple threads are sharing the CPU and taking turns for executing while in true concurrency multiple tasks are simultaneously executing on different CPUs at a time. Am I correct?

2 Answers2

2

User level thread have Apparent concurrency : If any thread makes a blocking system call then entire process is blocked i.e all the threads within the process is blocked this happens because the operating system does not understand that there are multiple threads as they are implemented by library

Kernel level thread true concurrency: can recognize that there are multiple threads so if one thread blocks then there are other threads that get picked up and can perform concurrently.

1

You're looking for the difference between Concurrency and Parallelism.

The former is multiple processes/threads sharing a single core. This is what you refer to as "apparent concurrency". Parallelism actually has multiple instructions running at the same time.

aspen100
  • 965
  • 11
  • 22