-
Notifications
You must be signed in to change notification settings - Fork 173
Add the answer for Concurrency vs Parallels #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,7 +84,18 @@ Child process cannot change variables of its parent. | |
|
|
||
| ## Concurrency vs Parallels? (in case single CPU core and multiple CPU cores) | ||
|
|
||
| To be defined. | ||
| Concurrency: executing multiple tasks at the same time but not necessarily simultaneously. | ||
|
|
||
| Parallelism: means that an application splits its tasks up into smaller subtasks which can be processed in parallel, for instance on multiple CPUs at the exact same time. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my opinion, |
||
|
|
||
| Concurrency can happen on single CPU or multiple CPUs. But Parallelism requires hardware with multiple CPUs. | ||
|
|
||
| A single CPU core can work on only one task at a time. | ||
|
|
||
| Ex: | ||
| - If multiple tasks are given to a single CPU, e.g., playing a song and writing code, it simply switches between these tasks. This switching is so fast and gives an illusion as if the tasks are running in parallel (although this is concurrent). | ||
| - If two tasks are given to a hardware with multiple CPU cores, each CPU will process a task, and two tasks will be processed in parallel. | ||
|
|
||
|
|
||
| ## What is critical zone? | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on Cambridge Dictionary, simultaneously = happening or being done at exactly the same time

So this sentence:
is kinda confusing.