No video

Parallelism vs Concurrency

  Рет қаралды 12,474

CodeVault

CodeVault

Күн бұрын

Source code can be found here:
code-vault.net...
===== Support us through our store =====
code-vault.net...
===== Check out our website =====
code-vault.net
===== Check out our Discord server =====
discord.code-v...

Пікірлер: 20
@kapildeshmukh7878
@kapildeshmukh7878 3 жыл бұрын
Thanks a bunch. I have my Linux finals on 19th Jan. This was a godsent.
@bsgamer5069
@bsgamer5069 3 жыл бұрын
Your explanation is just amazing. I have a job interview next Thursday. I will comment if I get hired 😁. And I have posted your channel link to Facebook group
@0x2d26
@0x2d26 3 жыл бұрын
what's the job title?
@bsgamer5069
@bsgamer5069 3 жыл бұрын
@@0x2d26 junior developer. I will be doing programming stuffs.
@_4p_
@_4p_ 2 ай бұрын
thanks man
@alienflip5492
@alienflip5492 3 жыл бұрын
Great videos mon ami!
@narasarajv5278
@narasarajv5278 3 жыл бұрын
Thank you..
@vorio5310
@vorio5310 Жыл бұрын
When I was testing how the number of threads affects speed, I encountered a very strange behavior. With one thread the time is about 2s, with two the time is 10s!!!! And when adding more threads the time decreases (with 32 threads the time is about 4s). I was running the code on a virtual machine with 4 cores. I didn't use any mutexes and sleep() functions. What is the reason for that?
@CodeVault
@CodeVault Жыл бұрын
If the workload is very small then the overhead of creating and waiting for threads plays a much bigger role. After 4 threads you shouldn't see much of a performance improvement. Do you have the exact time it take to execute for each number of threads you tested? Also, can you share the code you're trying to execute? Thanks
@Awwe12675
@Awwe12675 Жыл бұрын
I know parallel used multiple core and thread is only one core But I have question what is task What is multiplthreds
@CodeVault
@CodeVault Жыл бұрын
Threads have different meanings based on which part of the computer you're looking at. A thread in the hardware is the number of cores the OS sees. (So if you have a 4 core 8 thread CPU, the OS sees that you actually have 8 cores and you can run 8 processes in parallel). A thread in software is just another line of execution for a process A task is usually a program that is executed completely on one single thread
@Awwe12675
@Awwe12675 Жыл бұрын
@@CodeVault Thank you bro but I have the same issue I can’t understand If we say parallel just use core okay “ And thread is one core with the same program running okay “ task is thread like events in the same program run? And why some people say multiplethread it’s seems to me it’s threads ? Can you draw that in future videos please And sorry for my bad English
@CodeVault
@CodeVault Жыл бұрын
Alright, I'll see what I can do in the future
@Awwe12675
@Awwe12675 Жыл бұрын
@@CodeVault thank you bro
@antonfernando8409
@antonfernando8409 2 жыл бұрын
Would your definition still hold true when there are multiple CPUs?
@CodeVault
@CodeVault 2 жыл бұрын
Yes, of course. Multiple CPUs on the same system acts much like one large CPU
@fernandaeschallots2485
@fernandaeschallots2485 3 жыл бұрын
But I realized that Parallelism is more effective
@CodeVault
@CodeVault 3 жыл бұрын
Yes, ideally you want your program to run in parallel without any concurrency (or as little as possible)
@fernandaeschallots2485
@fernandaeschallots2485 3 жыл бұрын
I didn't understand anything....Google Translator probably doesn't work well
@CodeVault
@CodeVault 3 жыл бұрын
Yea... sorry, we don't have captions for other languages
Thread Pools in C (using the PTHREAD API)
22:54
CodeVault
Рет қаралды 42 М.
Is it concurrent or parallel?
3:48
Jacob Sorber
Рет қаралды 21 М.
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 51 МЛН
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 786 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 297 М.
Difference between processes and threads
10:30
CodeVault
Рет қаралды 109 М.
Practical example for pthread_mutex_trylock
13:12
CodeVault
Рет қаралды 15 М.
Condition variables in C
18:57
CodeVault
Рет қаралды 93 М.
are "smart pointers" actually smart?
9:44
Low Level Learning
Рет қаралды 73 М.
The Clever Way to Count Tanks - Numberphile
16:45
Numberphile
Рет қаралды 914 М.
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18