Mutex VS Semaphore In C++

Поділитися
Вставка
  • Опубліковано 14 лис 2024

КОМЕНТАРІ • 25

  • @jaykishansingh1
    @jaykishansingh1 5 місяців тому +2

    Now interview questions are getting repeated and sometimes i know what they are going to ask. This is all because of you. Thank you sir.

  • @sabbulingineni
    @sabbulingineni 9 місяців тому +1

    Nice to see you rupesh, i am following this channel from past 5-6 years and thanks for c++ knowledge u r giving❤

  • @TMNIARB3A
    @TMNIARB3A 4 місяці тому +1

    great explanation of the difference between sem and mutex, thank you sir!

  • @LinkSF1
    @LinkSF1 2 місяці тому +1

    From everything I read, sephamore seems to be almost always the way to go. The only time I want mutex is when there’s only a single thread I need controlled AND that control needs to happen within the thread that initiated the mutex. Is this your understanding as well?

    • @CppNuts
      @CppNuts  2 місяці тому +1

      Actually semaphore is a signaling mechanism and mutex is locking mechanism, this is the simple and short to understand and remember forever.

  • @mehtubbhai9709
    @mehtubbhai9709 8 місяців тому +2

    Very good content! Also your voice is ASMR; very calming to listen to. Makes me want to binge watch :)

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

      Thanks man..

  • @SibaPrasadNayak-r4s
    @SibaPrasadNayak-r4s 2 місяці тому

    Thank you bro.. You are doing really great job.. you make it so easy to understand.

  • @mystery5868
    @mystery5868 9 місяців тому +3

    Lovely explanation

  • @FS-rm1yg
    @FS-rm1yg 9 місяців тому +1

    The threads on semaphore read/write to the same resources simultaneously?
    How the access of a variable is garanteed in a group of threads?

  • @chandrashekharswain-g7l
    @chandrashekharswain-g7l 5 місяців тому

    Hi Rupesh, I have a doubt about use case of synchronization object, if two separate applications want to access/modify a same file , which synchronization object can used to synchronize them?

  • @pujabglr
    @pujabglr 5 днів тому

    What if in case of semaphore example explained in the video the thread count is 2, and both t1 and t2 try to access the same slot of resource out of 4 at the same time how will the systen ensure effective assignment?

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

    Great Explanation! Instantly understood the difference

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

      Thanks dude!!

  • @muralikrishnanayyappan6513
    @muralikrishnanayyappan6513 3 місяці тому

    thank u my friend ! helps with the tortuous interviews these days !

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

      Happy to help!

  • @subhaspaul495
    @subhaspaul495 8 місяців тому +1

    6:51 is it require to limit count = no of resource?

  • @SatyamKumar-bw4vi
    @SatyamKumar-bw4vi 9 місяців тому +1

    Gajab, appka chera dekha pehlibaar
    Please appna linkedin do.
    THanks mai appse Bahut kuch sikha ho

    • @CppNuts
      @CppNuts  9 місяців тому +1

      Thanks dude..

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

    THE Best Explanation

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

    Why title is c++, is it for implementing

  • @leelaseshukumarsanka649
    @leelaseshukumarsanka649 9 місяців тому

    Bro why you revels your face.
    At least you should keep curiosity na , who is this guy giving such a great explanation like.

    • @leelaseshukumarsanka649
      @leelaseshukumarsanka649 9 місяців тому

      Small request, please do videos like initial.
      Reason is : we like your voice while listening we are in imagination mood.
      Easily understand that concept with help of your way of explanation.
      Thanks once again your dedication in this field.

  • @satyammishra6356
    @satyammishra6356 9 місяців тому

    I am professional thumbnail, graphic designer and video editor.
    If there is any project then here is my portfolio.

  • @leelaseshukumarsanka649
    @leelaseshukumarsanka649 9 місяців тому

    You don’t, I am big fan of you since 2018 .
    I started Watching your videos for my interviews and learning point purposes also.