Concurrency vs Parallelism | C# Interview Questions | Csharp Interview Questions and Answers

Поділитися
Вставка
  • Опубліковано 5 лют 2025
  • For more such videos visit www.questpond.com
    For more such videos subscribe / questpondvideos
    See our other Step by Step video series below :-
    JavaScript Interview Questions: • JavaScript Interview Q...
    C# tutorial for beginners(4 hrs):- • C# Tutorial for Beginn...
    ASP.NET MVC Core Interview Questions with answers:- • ASP.NET MVC Interview ...
    C# interview questions and answers:- • C# Interview Questions...
    Abstract class vs Interface in C# :- • Abstract Class vs Inte...
    Learn Azure Step by Step:- • Azure Tutorial for Beg...
    Azure AZ-900 fundamentals certification :- • AZ 900 Certification |...
    Angular Interview Questions and Answers :- • Angular Interview Ques...
    Learn Angular tutorial step by step tinyurl.com/yc...
    Learn MVC Core step by step :- tinyurl.com/y9j...
    Learn Design Pattern Step by Step goo.gl/eJdn0m
    Python Tutorial for Beginners:- • Python Tutorial for Be...
    Learn Data Science in 1 hour :- tinyurl.com/y5...
    Learn Power BI Step by Step:- tinyurl.com/y6...
    PHP Interview Questions : • PHP Interview Question...
    Learn MSBI Step by Step in 32 hours:- goo.gl/TTpFZN
    Learn Tableau step by step :- tinyurl.com/kh...
    Learn SQL Server Step by Step tinyurl.com/ja4...
    Learn SharePoint Step by Step in 8 hours:- goo.gl/XQKHeP
    concurrency vs parallelism
    -----------------------------------------------------------------------------------------------
    For more details :-
    🌐 Website : www.questpond.com
    📱 Mob. No. : +91-9967590707 / +91 7700975156 / +91-22-49786776
    📧Email : questpond@questpond.com / questpond@gmail.com / questpond@yahoo.com
    Share, Support, Subscribe and Connect us on!!!
    UA-cam: / questpondvideos
    Twitter: / questpond
    Instagram : / questpond
    Facebook : / questpond
    #ConcurrencyvsParallelism #ConcurrencyinC# #ParallelisminC# #DifferenceBetweenConcurrencyandParallelism #CSharpInterviewQuestions #C#InterviewQuestions&Answers #C#InterviewQuestionsforFreshers

КОМЕНТАРІ • 98

  • @questpondvideos
    @questpondvideos  3 роки тому +5

    30 Important C# Interview Questions : ua-cam.com/video/BKynEBPqiIM/v-deo.html
    Software Architecture Interview Questions : ua-cam.com/video/AtTgcbLOqMM/v-deo.html
    25+ OOPS Interview Questions : ua-cam.com/video/u99wAoBjDvQ/v-deo.html
    20+ SQL Server Interview Questions : ua-cam.com/video/SEdAF8mSKS4/v-deo.html
    10+ Power BI Interview Questions : ua-cam.com/video/Cozc9WNBRt4/v-deo.html
    20 MSBI Interview Questions : ua-cam.com/video/Nw_sHEKnOUE/v-deo.html
    SQL Server Joins : ua-cam.com/video/KTvYHEntvn8/v-deo.html
    SQL Step by Step - ua-cam.com/video/uGlfP9o7kmY/v-deo.html
    Angular Step by Step Tutorial for Beginners : ua-cam.com/video/-9VcW7MBDs8/v-deo.html
    25 Angular Interview Questions : ua-cam.com/video/-jeoyDJDsSM/v-deo.html
    25 Important ASP.NET Interview Questions : ua-cam.com/video/pXmMdmJUC0g/v-deo.html
    35 Important JavaScript Interview Questions : ua-cam.com/video/Zb4dPi7CANU/v-deo.html
    20 MySQL Interview Questions : ua-cam.com/video/9hfjC-BpY20/v-deo.html
    5 MSBI Interview Questions : ua-cam.com/video/5E815aXAwYQ/v-deo.html
    20 PHP Interview Questions : ua-cam.com/video/1bpNSynUrl8/v-deo.html

  • @SushrutKanetkar
    @SushrutKanetkar 3 роки тому +13

    One of the best teachers I ever came across ! Thank you sir, you are amazing

  • @bengalibabu2435
    @bengalibabu2435 6 років тому +41

    Sirji you are from a different planet. Awesome master piece.

    • @VitaminCode
      @VitaminCode 2 місяці тому

      Kya kehna chahta hai bhai 😂

  • @dorinpopa6962
    @dorinpopa6962 4 роки тому +3

    The best explanation of those concepts I have found on UA-cam! 10/10!

  • @antonyspiano2403
    @antonyspiano2403 4 роки тому +2

    Great job, I searched more than 20 videos for sure , to get a confident view on this.. you did it . Great job!!! Thank you!

  • @hocky-ham324-zg8zc
    @hocky-ham324-zg8zc 4 роки тому +12

    Using your definition at around 17:15, threads are contained in the same process as the main thread, and therefore are run on the same core. I think the overall explanation was good but in order for multiple tasks to occur on different cores, you need separate processes, not threads. Threads are also context switching, but the specifics of when to join the threads, etc. is done manually whereas async/await is done for you by the language.

    • @rahulk2573
      @rahulk2573 6 місяців тому

      I have a doubt that even if multiple threads are running on a same core through thread interleaving then it will concurrent programming and not parallel programming right?
      So is multi-threading not always parallel programming?

    • @hocky-ham324-zg8zc
      @hocky-ham324-zg8zc 6 місяців тому +1

      ​@@rahulk2573 yes, multi-threading is not always done in parallel. I believe if you have a multicore CPU, most OS' schedulers are able to correctly dispatch different threads to different cores. For CPUs with 1 core, they are still able to perform tasks concurrently via thread interleaving like you correctly pointed out.

  • @publicfare8939
    @publicfare8939 3 роки тому +2

    the explanation is so detail and easy to understand, thanks for your hardwork

  • @rubyc7771
    @rubyc7771 8 місяців тому

    Thanks for teaching like we're dummies. I can't express how much I appreciate your teaching style.

  • @abidzahid2974
    @abidzahid2974 Рік тому

    Explained very well now I must say I am theoretically clear on concurrency and parallism

  • @aasurjya
    @aasurjya 7 місяців тому +1

    Great One, helped me building parallel core app in unity.

  • @rishabhmalhotra6474
    @rishabhmalhotra6474 Рік тому +2

    what an amazing video! great work and very glad to be able to understand these concepts as I have always somewhat struggled with these

  • @heezukaa8803
    @heezukaa8803 4 місяці тому

    One of the best tutorial i have ever found thank you so much hope you will upload more updates video about c#.

  • @georgeseese
    @georgeseese Місяць тому

    Need to quantify the two tasks. How much time for T1 and T2? For example, T1=5; T2=10. Think of multiple sentences to a prisoner. In (A) "Consecutive" (not shown here) 5, then 10 = 15. (B) Concurrency to a prisoner means both at same time. But here, both T1 and T2 must finish in same total time (5 + 10) (not good for prisoner), but maybe one or two at a time. In (C) Parallel means maximum time of all tasks is required (10). The difference is how attention is given to each task. In A and C, full attention to each, but in C it's to both. In B attention is toggled so both tasks "feel" they're getting full attention (@2:23), important for user.

  • @tonybapuji5956
    @tonybapuji5956 3 роки тому +1

    Excellent tutorial with fundamental points clearly and concisely explained.
    Thank you so much!

  • @imsraone
    @imsraone Рік тому

    Last picture was just awesome and make really sense :)

  • @zeenatmalik2816
    @zeenatmalik2816 5 років тому +2

    This is the best lecture on these topics 👍

  • @edipocdf
    @edipocdf 2 роки тому

    Valeu!

    • @questpondvideos
      @questpondvideos  2 роки тому

      @Edipo G Thank you for your contribution; it will encourage us to create more useful content.
      Happy learning....!

  • @iam_ashishmishra
    @iam_ashishmishra 5 років тому +4

    Really Impressive... Thank you for making me clear about these concepts.

  • @vineetchaudhary7082
    @vineetchaudhary7082 4 роки тому

    I am a big fan of you sir. What a knowledge you have sir. Thanks a lot for such tutorials.

  • @PankajKumar-tb5up
    @PankajKumar-tb5up 6 років тому +7

    Last images summarizes the whole lecture :)

  • @deltaphilip8611
    @deltaphilip8611 3 роки тому +1

    This has cleared up a lot of confusion for me.

  • @ashutoshmishra2170
    @ashutoshmishra2170 3 роки тому

    I am big fan of your teaching 💕

  • @TarunKomma
    @TarunKomma 6 років тому

    To the point with lucid explanation ... hats off sir ji

  • @johnnguyen1655
    @johnnguyen1655 4 роки тому +2

    I love those explanations. Thanks for your hard work!

  • @RajuPatil-w2u
    @RajuPatil-w2u 3 місяці тому

    Very well explained. Thank You Shiv

  • @scubagrant6045
    @scubagrant6045 5 років тому +1

    Great job. Very clear.

  • @alshifamedicine
    @alshifamedicine 6 років тому +1

    Nice Explanation
    At 11:44 if instead of placing debugger on LINE17 place it at LINE13
    and debug through code and observe the threads, see multiple threads as in case of parallelism.
    It appears async await use multiple threading in background but if its using multiple threads then
    why they need context switching?

  • @danielvisan3405
    @danielvisan3405 5 місяців тому

    Thank you! Very well explained!

  • @JagadishMori
    @JagadishMori 6 років тому +1

    Very helpful and easily explained, thanks again

  • @successquotes-ts3dw
    @successquotes-ts3dw Рік тому

    Your are really producing good content sir

  • @abhi1779
    @abhi1779 5 років тому

    I have never found anyone who can explain better then Shiv Prasad Koirala Sir

  • @aktchungrabanio6467
    @aktchungrabanio6467 3 роки тому +2

    Wonderful explanation. Just a small correction: Instead of determistic, it should be deterministic. Other than that, excellent content.

  • @vaishalidube4312
    @vaishalidube4312 3 роки тому

    Beautiful explanation!!

  • @gipbwok2008
    @gipbwok2008 3 роки тому +1

    Good explanation. I think at 14:50 the word is "undeterministic".

  • @shashidev7941
    @shashidev7941 4 роки тому +1

    Thank you for this wonderful Tutorial.

  • @Mr-Doctor-King
    @Mr-Doctor-King 5 років тому

    You are the real MVP.

  • @mferreira1231
    @mferreira1231 4 роки тому

    Superb explanation!

  • @Dharmeshpatel-to2nd
    @Dharmeshpatel-to2nd 5 років тому +1

    Very nicely explained :)

  • @saikiranankam7617
    @saikiranankam7617 5 років тому

    Super impressive. Excellent 🙏

  • @epuriraghavendra3847
    @epuriraghavendra3847 5 років тому +1

    Such a great explanation. Thank you sir.

  • @321zipzapzoom
    @321zipzapzoom 4 роки тому

    Nice explanation Sir

  • @vrajeshbadgujar
    @vrajeshbadgujar 8 місяців тому

    You are a Gem. Thanks!

  • @VIjayKumartheh2o
    @VIjayKumartheh2o 5 років тому +5

    So I have question after looking into this video. Is Async & Await coming under concurrency? That's what I understood after looking at the Threads in debug mode.

  • @shashankpandey1019
    @shashankpandey1019 6 років тому

    You are the Real Rocks Sir 🙏🙏🙏

  • @petrcipera8999
    @petrcipera8999 4 роки тому

    Nicely explained!

  • @ghanshamkashyup6235
    @ghanshamkashyup6235 4 роки тому

    Very nice explaination ur video better than udmey videos

  • @RameezTV
    @RameezTV 5 років тому +1

    Hi, when you said that threads were not created, because you didn't want to run parallely, but threads can run concurrently as well, right?

  • @mihailomarcetic2516
    @mihailomarcetic2516 2 роки тому

    great video !!

  • @rr9336093122
    @rr9336093122 6 років тому

    was really clear and concise....thanks

  • @slobodantajisic2762
    @slobodantajisic2762 3 роки тому

    Since one core can have multiple threads, is performing different tasks on different threads of the same core parallelism?

  • @adamakkouche3297
    @adamakkouche3297 3 роки тому

    So as a consequence at the end of the computation, running our processes in series or concurrently is in terms of total time speed equivalent ? This is just a matter of perception.

  • @khanfaizan05
    @khanfaizan05 22 дні тому

    Respect respect and respect ❤❤❤

  • @deependrajoshi199
    @deependrajoshi199 Рік тому

    I want to understand here that you created 2 worker threads: NewMethod() and NewMethod1() and there is one main thread means total 3 but here in the debug there are 3 worker threads and one main thread means total 4 threads so why there is one extra worker thread created for?

  • @hosamhemaily4817
    @hosamhemaily4817 4 роки тому

    really good

  • @saikiranbhr
    @saikiranbhr 5 років тому +5

    Hi, As mentioned if async and await doesn't use threads then i have a doubt, I have created 2 async methods which are having some 20secs of code (as an example task.delay(20seconds)) and i have called them one after the other. If async concept doesn't use threads and if it only uses context switch then i think in order to run my code and show me the result it shoud take 40seconds ideally. But when i tried, it is taking only 20sec and gives me correct and expected output. Could you please clarify the doubt and do correct me if i am missing anything. Thanks in advance.

    • @KanhaiyaKumar-rn6zg
      @KanhaiyaKumar-rn6zg 4 роки тому +2

      you are right async and await are not just context switching, It is about multi theading as well. if you want to know more detail about this o'really media has very good on async and await.

    • @AB-cn5hb
      @AB-cn5hb 4 роки тому +2

      I hope I am not late. It's case of multithreading. He mentions in video about context swapping that only happens if no more multithread is available. For example, I have 2 core CPU and it has multithreading enabled. That means, I have generally speaking 4 core. So, when u use async, it is as it is working in different thread hence u see 20 sec. But suppose, I have 1 core CPU no multicore or multithreading. That's means all tasks has to perform in same thread. Hence, context swapping or time slicing. In this case, there is no benefit of using async other than responsive.

    • @ahmed19924
      @ahmed19924 2 роки тому

      @@AB-cn5hb In simpler words, threads basically does work on the same 'Worker thread' but if we use 2 tasks then it will use two different 'worker thread'. Correct me if I'm wrong.

  • @tomarshabh2199
    @tomarshabh2199 3 роки тому

    superbbb!!!!!!!!

  • @programmadore9588
    @programmadore9588 4 роки тому

    very good explanation tho !!!

  • @TheRetrospective
    @TheRetrospective 4 роки тому

    Good video! One quick tip: 'deterministic' is correct spelling and not 'determistic'.

  • @hornybastard
    @hornybastard 4 роки тому

    thanks. very useful

  • @adelhishem1
    @adelhishem1 6 років тому

    Thank you for the video, really nice work.

  • @uribe2211
    @uribe2211 5 років тому

    Great!! thanks for sharing

  • @tnduc91
    @tnduc91 5 років тому

    great work mate, thank you!

  • @JourneywithNarasimha
    @JourneywithNarasimha 6 років тому

    Thank you so much..... Thanks alot for sharing such a wonderful stuff

  • @joselucargarrido7511
    @joselucargarrido7511 4 роки тому

    Nice

  • @chimakurthiharitha
    @chimakurthiharitha 3 роки тому

    Shiv sir - Can I use concurrency and parallelism both at once as I need performance as well as usage both at a time🤔

    • @unbekannt6111
      @unbekannt6111 2 роки тому

      If u use parallelism u have the non blocking aspect included so.

  • @sushilsuthar356
    @sushilsuthar356 5 років тому

    Now i understood after so many articles and videos.

  • @programmadore9588
    @programmadore9588 4 роки тому

    Why does it show no threads running for me? 11:05

  • @ananyafrederick2524
    @ananyafrederick2524 5 років тому

    Beautiful!!!!!!

  • @nithinchandran7959
    @nithinchandran7959 6 років тому

    You just cracked something i was worried about for many days..when are u going to release the second part?

    • @questpondvideos
      @questpondvideos  6 років тому

      Its here ua-cam.com/video/G3tz9rxts8E/v-deo.html

  • @Gauravkumar-jm4ve
    @Gauravkumar-jm4ve 2 роки тому

    Tx sir

  • @izzyr9590
    @izzyr9590 4 роки тому

    IT developers. This is such a interesting name.

  • @kumargaurav8619
    @kumargaurav8619 6 років тому

    Nailed it!!!

  • @danyaathiyaguthiyagu8175
    @danyaathiyaguthiyagu8175 6 років тому

    Async have .configuration(false or true) in their calling level . That is helpful for performance ?

  • @vamsikumar_n
    @vamsikumar_n 5 років тому

    sirji please make a video on Dependency inject in c#

  • @PI-Thoughts
    @PI-Thoughts 3 роки тому

    do not know, how many times i have watched

  • @sachinbonde89
    @sachinbonde89 2 роки тому

    👍👍

  • @wew6438
    @wew6438 5 років тому

    omg i can finally found an indian acent that i could understand

  • @benyahiahassen4540
    @benyahiahassen4540 5 років тому

    the threads do not appear in my thread panel, does any one know why?

  • @HarshaVardhan-dg7ii
    @HarshaVardhan-dg7ii 4 роки тому

    Imagine juggling with computers!!

  • @リンゴ酢-b8g
    @リンゴ酢-b8g 2 роки тому

    as to his accent, of course it's indian

  • @HateExisting-d3o
    @HateExisting-d3o Рік тому

    not working

  • @AngryBerserk
    @AngryBerserk 3 роки тому

    It looks like you are confusing concurency with asynchronism

  • @dibbyo456
    @dibbyo456 4 роки тому +1

    Excellent explanation. Thank you 🙏.

  • @navneethegde5999
    @navneethegde5999 2 роки тому

    Nice explanation!