You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-12Lines changed: 27 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,20 +25,35 @@ java calisma
25
25
</repository>
26
26
27
27
28
-
#Concurrency vs Parallelisim
28
+
# Concurrency vs Parallelisim
29
+
29
30
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|
41
43
44
+
Concurrency + parallelism
45
+
(Multi-Core CPU)
46
+
___ ___
47
+
|th1|th2|
48
+
||___|
49
+
| |___
50
+
|___|th2|
51
+
___|___|
52
+
|th1|
53
+
| |___
54
+
||th2|
55
+
56
+
42
57
43
58
Parallelism is simultaneous execution of processes on a multiple cores per CPU or multiple CPUs (on a single motherboard).
44
59
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