Search code examples
processoperating-systemmultiprocessingprocessorconcurrent-programming

Types of Concurrent processes


"Processes may be described as physically concurrent and logically concurrent processes, the distinction between them is analogous to that between real and virtual processors"

what does that mean?

What is the difference between physically concurrent and logically concurrent processes?


Solution

  • What is the difference between physically concurrent and logically concurrent processes?

    Suppose if you've a single core processor, and suppose if you have multithreading in your code, it'll show as if it is running in parallel in multiple different processors; but, in reality it utilises the single processor, where quantum of time is allotted to each threads in round-robin manner. In this case, the processes(OR threads) seem to be running in parallel concurrently, but, in reality, there is context switch many-a-times between the processes(threads) to simulate as if they are running simultaneously.

    Whereas, had you been having multiple cores in your processor(or multiple processors), your multithreaded code would have executed in parallel on different cores(or processors, if there) concurrently! In this case, the processes are running in parallel concurrently.

    I hope it clears your doubt! Feel free to ask in case of further queries.