Concurrency vs Parallelism

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 161

  • @neetha2447
    @neetha2447 2 года назад +39

    My analogy after going through your video.
    Parallelism is like cars running on 4 different roads and concurrency is when those roads meet at an intersection how to manage traffic without accident using traffic light.
    Great video as always 👍🙏

  • @rolandovillcaarias5112
    @rolandovillcaarias5112 4 года назад +35

    Hi, what about this definitions, "Parallelism is about doing lot of independent things at once", and "Concurrency is about dealing with lot of dependent things at once", that is what I understood that according your explanation. :)

    • @pablon3115
      @pablon3115 2 года назад +3

      Best comment ever.

    • @gnosis8142
      @gnosis8142 2 года назад +1

      I would use "codependent" or "interdependent" instead of "dependent".

    • @neetha2447
      @neetha2447 2 года назад +13

      Parallelism is like cars running on 4 different roads and concurrency is when those roads meet at an intersection how to manage traffic without accident using traffic lights.

  • @devtest8078
    @devtest8078 3 года назад +1

    Possibly the best explanation of Concurrency & Parallelism I have ever listened to. Well done.

  • @remarofail9625
    @remarofail9625 5 лет назад +4

    For me, it is the best tutorial for explaining concurrency and parallelism

  • @cynthia7000
    @cynthia7000 3 года назад +1

    One of the best-explained videos on concurrency, thanks!

  • @dwivedys
    @dwivedys 2 года назад

    Never seen a clearer explanation of this extremely tricky topic 🙏🙏🙏

  • @pranjalabhishek7566
    @pranjalabhishek7566 5 лет назад +2

    never seen such explanation anywhere..it cleared my all doubts

  • @anuragsharma1993
    @anuragsharma1993 4 года назад +5

    It really helped me clear the confusion between parallelism and concurrency.

  • @SpiritualManish
    @SpiritualManish 6 лет назад +11

    Awesome as usual, clear voice, simple explanation. Thank you :)

  • @nooruskhan5200
    @nooruskhan5200 5 лет назад +3

    This (playlist) is best video tutorial on modern multithreading concept, Thanks :)

  • @mayurlohar1509
    @mayurlohar1509 Год назад

    I checked lot of other tutorials. But the way you explained the things comparing with similar options alongside really helped a lot. This reduces confusion and gives clarity. Thanks brother 😊

  • @kunalrai7577
    @kunalrai7577 3 года назад

    You are simply amazing , I have really not seen such a clear explanation anywhere . God bless you dear brother.

  • @sanketskhandekar
    @sanketskhandekar 3 года назад

    This guy needs support you are superb. Keep uploading new videos

  • @KarthikaReddyS
    @KarthikaReddyS 5 лет назад +8

    Nice explanation, Just one suggestion it would be great if you could show the difference of both wrto definitions as a single slide it would be good to memorise. For example timestamps 1:32 & 6:51 can be shown next to each other in single slide to communicate the difference effectively

    • @DefogTech
      @DefogTech  5 лет назад +4

      Good point, thanks.. will note it for future videos

  • @29_sauravpadghan45
    @29_sauravpadghan45 Год назад +1

    Mind Blowing Explanation

  • @ma-hf6gh
    @ma-hf6gh 6 лет назад +40

    You are a great explainer

    • @DefogTech
      @DefogTech  6 лет назад +3

      Thank you :)

    • @hydtechietalks3607
      @hydtechietalks3607 3 года назад +1

      @@DefogTech Thank you SSSSOOO MUCH SIR.. You have great QUALITY CONTENT! SALUTE TO YOUR EFFORTS!

  • @Lukadepailuka
    @Lukadepailuka 5 лет назад +6

    Best explanation in entire internet. ;)

  • @goodtime5468
    @goodtime5468 3 года назад

    Clear core explanation is an outcome of you wonderful experience.
    Thank you for making video.

  • @vijayvaswani9717
    @vijayvaswani9717 4 года назад

    best video I have ever seen on concurrency and parallelism, this has answered many of questions in my mind.Thanks a lot.

  • @abhi_tech3590
    @abhi_tech3590 5 лет назад +1

    Any damn fool can make things look complex but it takes a genius to give it an easy touch . Great video !!

  • @Techtter
    @Techtter 4 года назад +1

    Good explanation in simple terms..thanks dude..

  • @puneetmishra545
    @puneetmishra545 3 года назад +3

    Thank you very much for making these concepts clear! This can definitely help many learners to continue or start learning these topics with a greater enthusiasm. Thanks again 👍🏻😊

  • @pluraltest9242
    @pluraltest9242 3 года назад

    Excellent! Easy to understand. Thanks for great video

  • @dawednesru5353
    @dawednesru5353 3 года назад +2

    I have no word to explain how much awesome you are!

  • @shankarnathmajumder
    @shankarnathmajumder 4 года назад

    Simply Awesome Demonstration.....!!!
    👍🏼👍🏼👍🏼👍🏼👍🏼

  • @paraspatel5763
    @paraspatel5763 Год назад

    Wonderfully explained. Thank you.

  • @sagarshekhar6296
    @sagarshekhar6296 5 лет назад +1

    Simple and straightforward.....Thanks for this excellent video....

  • @sangeethchitravel3092
    @sangeethchitravel3092 4 года назад

    Excellent.. clear tone and explanation. Awesome voice

  • @bilalhayat7007
    @bilalhayat7007 2 года назад

    the way u explain, makes things look damn easy.....!!!!🙏

  • @mrutyunjayathakur4597
    @mrutyunjayathakur4597 2 года назад

    Thanks for th b video. Waiting for new videos!!

  • @strangerkid8839
    @strangerkid8839 3 года назад

    Good Explanation in simple words

  • @lipi6535
    @lipi6535 4 года назад +1

    My question is "which concept is used when we run the first program in a single-core machine?"
    As per my understanding (someone correct me if I am wrong): Concurrency is the idea of structuring a program in such a way that it can achieve parallelism when multiple cores are available. It is not about synchronization between threads.
    Parallelism is about execution and concurrency is about the structure. (Rob Pike).
    So in that sense, the structure of a multi-threaded application in any modern programming language follows a concurrency pattern. And this can achieve parallelism when multiple cores are available.

    • @DefogTech
      @DefogTech  4 года назад

      Agree about concurrency is about structure. But all programming languages require explicit use of tools (locks, threads, coroutines,async-await etc) to make it happen. Even on single-core machine, a thread waiting for IO can be bounced out and other thread allocated for efficiency (which speedens up the program).

    • @lipi6535
      @lipi6535 4 года назад +2

      @@DefogTech I totally agree with you on this. To create proper concurrent programs you need tools like mutex locks, routines, threads etc.
      All I am saying is that program in the first example is also of concurrency.
      The execution of it is an example of parallelism.

  • @pramodcv
    @pramodcv 6 лет назад +2

    All your videos are too good.
    The way you explain is awesome. Animation is also very nice.

    • @DefogTech
      @DefogTech  6 лет назад +1

      Thank you for your support Pramod! I am happy it helped

  • @ibrahimshaikh3642
    @ibrahimshaikh3642 4 года назад

    Very beautiful explanation, plz make more videos like this

  • @rpkm85
    @rpkm85 5 лет назад +3

    Clear explanation.. keep it up bro..

  • @_________________404
    @_________________404 4 года назад +1

    Thanks for this video, very interesting

  • @mukulrana1616
    @mukulrana1616 4 года назад

    Best . Explanation . Ever!!

  • @sanjaypaudel3296
    @sanjaypaudel3296 2 года назад

    You got a new subscriber. What a explanation

  • @sergioantoniomartinez9227
    @sergioantoniomartinez9227 4 года назад +1

    Very helpful explanation, thanks a lot!

  • @202rupesh
    @202rupesh 5 лет назад +1

    The final summary of the video was awesome and perfect :)

  • @dinakaranonline
    @dinakaranonline 2 года назад

    Good one , thanks for sharing

  • @NaturalPro100
    @NaturalPro100 5 лет назад

    Easy,nice and practical examples.Superb job

  • @sriharshapamu
    @sriharshapamu 2 года назад

    Brilliantly explained :) Thanks a lot

  • @bharathsc1872
    @bharathsc1872 Год назад

    Great content, your videos taking me into next level in concurrency concepts

  • @imansh6995
    @imansh6995 2 года назад

    Great explanation, thanks man.

  • @abhishekkrishna9757
    @abhishekkrishna9757 6 лет назад +1

    Another great video. Thanks for uploading.

  • @shreebohara9943
    @shreebohara9943 2 года назад

    Very Nice Explaination

  • @JayOOfosho
    @JayOOfosho 4 года назад

    The best explanation on the topic. Thank you so much!

  • @sravankumar5220
    @sravankumar5220 2 года назад

    Very well explained.

  • @AliAshour-ww9ox
    @AliAshour-ww9ox Год назад

    thank you very much, great tutorial

  • @DivijShrivastava
    @DivijShrivastava 5 лет назад +2

    This was very great content. Thanks for sharing🙏

  • @nishan9689
    @nishan9689 5 лет назад

    Very nice. Clear explanation.

  • @cepi24
    @cepi24 4 года назад

    Nice explanation. Thanx

  • @avinashboddu387
    @avinashboddu387 4 года назад

    Nice explaination.

  • @shellindebted5328
    @shellindebted5328 6 лет назад +1

    Thank you so much for this great explanation.A long time confusion was cleared in this video.

    • @DefogTech
      @DefogTech  6 лет назад

      You're very welcome sir!

  • @qqwew1669
    @qqwew1669 3 года назад

    Thanks Dude! You are genius!

  • @shivendratiwari3238
    @shivendratiwari3238 4 года назад

    Bro, you are excellent in your explanation and presentation.
    Why don't you come up with videos on spring boot, everyone wants to learn

  • @premraj.m
    @premraj.m 11 месяцев назад

    7:33 Concurrency is about dealing lot of things at once. Deal Concurrency 7:11. Parallelism is about doing lot of things at once. Enable Parrallelism 2:03
    Concurrency is about dealing with a lot of things at once, but not necessarily doing them all at the same time. This means that a concurrent program can be run on a single-core processor, and the tasks will be interleaved.
    Parallelism, on the other hand, is about doing a lot of things at the same time. This means that a parallel program can only be run on a multi-core processor, and the tasks will be executed simultaneously.

  • @gnanasekaranebinezar7199
    @gnanasekaranebinezar7199 5 лет назад

    Wow!!! What a vivid explanation!!! Great work. You made hot topic to be more understandable and provided more information within a short span of time

  • @RajSekharK
    @RajSekharK 2 года назад

    Very good explanation

  • @akshaysiddhpura5807
    @akshaysiddhpura5807 5 лет назад

    Very clear explanation. Thank you for creating video on this topics.

  • @johncerpa3782
    @johncerpa3782 3 года назад

    Great explanation

  • @prabhatyadav3373
    @prabhatyadav3373 5 лет назад

    Awesome video.. thanks for sharing your knowledge

  • @adityaraghav8693
    @adityaraghav8693 2 года назад

    clear, explanations !!!!

  • @wattheshet
    @wattheshet 5 лет назад +1

    Ha! AWESOME VID. I am just starting to learn concurrency for android. Got my sub

  • @SivaKumar-cx7db
    @SivaKumar-cx7db 6 лет назад +1

    Very nice explanation. Thank you.

  • @kavi340
    @kavi340 5 лет назад

    Simple, clear (audio and video), content full video :-)

  • @amintalukder8583
    @amintalukder8583 3 года назад

    Thats nice... bro.

  • @ShivamKendre-fc3su
    @ShivamKendre-fc3su 8 месяцев назад

    great playlist

  • @akhilreddybandi
    @akhilreddybandi 2 года назад

    Very Concise

  • @vijaysg4216
    @vijaysg4216 2 года назад

    Hi Deepak, Love you content, way of presentation and in-depth concept explanation. Was wondering if you have any repo created for all the code that you showcase as example in the sides. It would really help to grasp the concept even further. Keep up the good work.

  • @Krish-qn9yv
    @Krish-qn9yv 3 года назад

    Awesome 👌

  • @rajeshg3570
    @rajeshg3570 2 года назад

    Very nice explanation. I've a question here -- I'm just trying to understand how 'CompletableFeature' could be used to achieve concurrency ( i mean to say, in the context of inter leaving)

  • @taiguntales
    @taiguntales 3 года назад

    good one bro!!

  • @pinkunew
    @pinkunew 5 лет назад

    precise explanation in simple words

  • @ismile47
    @ismile47 3 года назад

    Thanks you nice explanation

  • @shameekagarwal4872
    @shameekagarwal4872 Год назад

    i have a confusion, sorry if this is vague...
    we can have threads > cores of cpu
    we can also have tasks > threads
    why do we need to support concurrency at both these levels? doesnt this lead to much more inefficiency due to context switching?
    like wouldnt it have been better if
    number of threads were = number of cores in cpu to support parallelism
    number of tasks > number of threads to support concurrency?

    • @DefogTech
      @DefogTech  Год назад +1

      Thats what reactive programming helps with. It keeps number of threads constant (same as number of CPU cores). But the programming model becomes harder. Take example of web requests, if 1 thread operates on 1 request at a time you can have maximum 4 concurrent requests at a time, which is inefficent. If you want same thread to work on multiple requests then you have to handle the concurrency yourself making the code less straightforward. Thus the simpler way is more threads than cores.

    • @shameekagarwal4872
      @shameekagarwal4872 Год назад

      @@DefogTech right!
      for some reason i thought that the fact that there are more tasks than threads it means there is concurrency there as well, which is not true. tasks just get queued up...
      and like you mentioned concurrency is achieved by more threads than cores!

  • @superdevelopertr6127
    @superdevelopertr6127 5 лет назад

    super explanation. great thanks!

  • @ankurtripathi9799
    @ankurtripathi9799 4 года назад

    this is AKA race condition in os we can use binary semaphore(mutex) to solve this problem which ensures that only one thread can run the piece of code at a time and block other threads in blocking queue.

  • @sujitunim
    @sujitunim 5 лет назад

    Awesome work ... all tut are great

  • @cepi24
    @cepi24 4 года назад

    Pleaae make video about various concurrency models

  • @thomassun3046
    @thomassun3046 5 лет назад

    Excellent, do u know O’Reilly? If u can make a total series of multi-threading courses, I’m going to subscribe to it! U r teaching style is really amazing! Fantastic!

  • @gosnooky
    @gosnooky 5 лет назад

    People like to bag on Indian RUclipsrs, but this guy knows his shit

  • @parmarkamlesh6493
    @parmarkamlesh6493 2 года назад

    Can you create video for system design like geo location based staff management and some custom frameworks.

  • @winwinindiamyindia9980
    @winwinindiamyindia9980 4 года назад

    In the given example of Parallelism all tasks are independent to each other , but what if they are depends on each other or if they are sharing some object... wouldn't it be similar to concurrency where threads couldn't be execute in parallel manner

  • @srinusrinivas6101
    @srinusrinivas6101 5 лет назад

    Great Explanation

  • @radityoperwianto1339
    @radityoperwianto1339 5 лет назад

    Super Great!!!!
    Thank You so much

  • @nimishgupta749
    @nimishgupta749 5 лет назад

    Great Explanation.

  • @raghavdave1
    @raghavdave1 4 года назад

    Can the lock be called inside the 2 thread functions? Instead of defining them outside the functions?

  • @chrispaika8469
    @chrispaika8469 4 года назад

    this is amazing!

  • @anjaliarorafan6587
    @anjaliarorafan6587 5 лет назад +2

    Sir, instead of locks, cant we used synchronized modifier

    • @DefogTech
      @DefogTech  5 лет назад +2

      Yes we can, anything that helps 2 threads to coordinate

  • @fizzaali2144
    @fizzaali2144 2 года назад

    Can you help me with a concurrency question.

  • @vikasbhardwaj1502
    @vikasbhardwaj1502 5 лет назад

    Nice explanation which software you are using in your video for your notes

  • @publicindia1179
    @publicindia1179 6 лет назад +1

    Nice one 👍🏼!

  • @henryliu4085
    @henryliu4085 5 лет назад

    amazing explanation!

  • @mauricemartin3888
    @mauricemartin3888 4 года назад

    Thank you so much

  • @salahayman3513
    @salahayman3513 5 лет назад

    please provide a tutorial about monitor in threads

  • @electronicmayonnaise5692
    @electronicmayonnaise5692 5 лет назад +1

    Thank you.

  • @coolcoolj0102
    @coolcoolj0102 5 лет назад

    well done! may I know what software did you use for recording this?

  • @leesubiramaniyam2704
    @leesubiramaniyam2704 4 года назад +1

    kindly upload oracle related hard interview questions and DB schedulers

    • @DefogTech
      @DefogTech  4 года назад +1

      There is a playlist for interview questions on the channel.. can you please check if that helps