Definition: Concurrency is when two tasks overlap in execution. In programming, these situations are encountered: When two processes are assigned to different cores on a machine by the kernel, and both cores execute the process instructions at the same time. When more connections arrive before earlier connections are finished, and need to be handled immediately. More generally, it’s when we need to handle multiple tasks at about the same time. That’s it. That’s all concurrency is. Parallel execution is when two tasks start at the same time, making it a special case of concurrent execution. 4 levels of Concurrency: -- Machine Instruction level -- HLL(High-level language) statement level. -- Unit level -- Program level. There are two types of Concurrency: 1. Physical Concurrency 2. Logical Concurrency Physical Concurrency : Several program units from the same program literally execute simultaneously on dif...
Artificial Intelligence | Data Science | Software Engineering