Skip to content

Commit 826eee6

Browse files
authored
Update README.md
1 parent cfdb23b commit 826eee6

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

README.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,35 @@ java calisma
2525
</repository>
2626

2727

28-
#Concurrency vs Parallelisim
28+
# Concurrency vs Parallelisim
29+
2930
if you jhave two threads
30-
Concurrency Concurrency + parallelism
31-
(Single-Core CPU) (Multi-Core CPU)
32-
___ ___ ___
33-
|th1| |th1|th2|
34-
| | | |___|
35-
|___|___ | |___
36-
|th2| |___|th2|
37-
___|___| ___|___|
38-
|th1| |th1|
39-
|___|___ | |___
40-
|th2| | |th2|
31+
32+
Concurrency
33+
(Single-Core CPU)
34+
___
35+
|th1|
36+
| |
37+
|___|___
38+
|th2|
39+
___|___|
40+
|th1|
41+
|___|___
42+
|th2|
4143

44+
Concurrency + parallelism
45+
(Multi-Core CPU)
46+
___ ___
47+
|th1|th2|
48+
| |___|
49+
| |___
50+
|___|th2|
51+
___|___|
52+
|th1|
53+
| |___
54+
| |th2|
55+
56+
4257

4358
Parallelism is simultaneous execution of processes on a multiple cores per CPU or multiple CPUs (on a single motherboard).
4459
Concurrency is when Parallelism is achieved on a single core/CPU by using scheduling algorithms that divides the CPU’s time (time-slice). Processes are interleaved.

0 commit comments

Comments
 (0)