Concurrency vs. Parallel Programming
Understand the concept of concurrency and parallel processing/programming.
We'll cover the following
Intro to concurrent programming
Concurrent programming refers to when an application is making progress on more than one task at the same time (concurrently). If the computer has only one CPU, the application may not make progress or execute on more than one task at the same time, but more than one task is being processed at a time inside the application. It does not finish one task before it begins the next.
Concurrency means executing multiple tasks at the same time but not necessarily simultaneously.
Let’s look at an example: Suppose you went to purchase a coke bottle. You see that there are two queues in front of the vending machine. At a time, only one person from a queue can get the bottle, but the queues are in progress of getting the coke. See the visualization below to understand it better and then look at the corresponding visualization for a computer process.
Get hands-on with 1400+ tech skills courses.