Mutex Introduction (pthreads) | C Programming Tutorial

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

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

  • @16mobs50
    @16mobs50 Год назад +10

    i cannot emphasize enough on how helpful your entire channel is. thank you!!

  • @dzeno7370
    @dzeno7370 2 года назад +14

    I wish I had those videos a couple years ago when I was studying for my exams. Keep up the good work !

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

      Thank you for the kind feedback! 😀

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

      I'm watching these for my exams and they're so helpful

  • @pituboy
    @pituboy Год назад +2

    The YT algorithm just does a great work today, but I really wish I can use this video as my reference 2 years ago and complete my project at uni.

  • @GavinPicard
    @GavinPicard 6 месяцев назад

    5 days overdue on an assignment. -10 points per day. I am only get 50 points credit but I am fighting through. Thanks for this video.

    • @PortfolioCourses
      @PortfolioCourses  6 месяцев назад

      You're welcome! :-) And good for you for fighting through - you got this!

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

    Amazing voice, comments on your file and examples that are simple. It's also good that the jargon explained before using it and that the videos are concise.
    If you haven't corrected it already, it could be even better if you managed to cut the mouse and keyboard sounds.
    Anyway, keep up the good work ! It helps me with my system classes.

    • @PortfolioCourses
      @PortfolioCourses  Год назад +3

      Thank you, I'm glad you enjoy the video! Oddly enough, most people enjoy the keyboard and mouse sounds so I keep those in. :-)

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

      @@PortfolioCourses Yeah, I found the video helpful as well. The keyboard and mouse sounds are kinda like a weird form of ASMR if that makes sense lol

  • @depsylon4235
    @depsylon4235 Год назад +3

    again very easy to follow, but I think it may would've been nice to see how long the program takes with and without the lock (assuming the difference is visible here).

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

      That's a neat idea! :-) The source code is available here if anyone wants to try this as a fun follow-up "exercise": github.com/portfoliocourses/c-example-code/tree/main/mutex.

  • @TK-ko3fg
    @TK-ko3fg Год назад +1

    thank you so much guys, this helped me to catch up with my OS class

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

      You're very welcome, I'm glad to hear this video was able to help you out with your OS class! :-)

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

    Excellent explanation of a tricky subject.

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

      I’m glad you enjoyed the explanation, and thank you for the positive feedback! :-)

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

    Great explanations, thank you for this tutorial! helping me a lot for my exam prep :).

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

    Great video on thread handling, your the best :)

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

      Thank you for the positive feedback, I’m very glad you enjoyed the video! :-)

  • @inhle1688
    @inhle1688 28 дней назад

    you make it make so much sense!!!!

  • @RakeshSolanki1
    @RakeshSolanki1 22 дня назад

    Apart from the quality content. I also liked your minimalist style, you only use comments to make diagrams or text slide. I think that will take good effort but ultimately keeps things simple. This understanding only comes with experience.

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

    fantastic explination, thank you!

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

    This video really helped! Thanks a ton

  • @zz3709
    @zz3709 8 месяцев назад

    Great content, but I'm never a fan of creating variables that look like keywords (ie: "mutex" in this case). Just adds more confusion. Maybe something like "acct_write_key", etc.

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

    Excellent explanation thanks 😅!

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

    At 9:38, should the read balance be 200?

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

    Love it baby!

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

    Hello Sir, i tried the same code in my Visual studio environment, some times it gives output as 500 and sometimes 200/300 (each run one value). I donot understand what is going wrong.Could you please help?

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

      Hmm, I'm not sure what could be happening Vibhasree. :-( The code in the video is available here: github.com/portfoliocourses/c-example-code/tree/main/mutex. Maybe try using that exact code if you weren't already? Perhaps there is a small difference that is causing the bug. The other issue is that POSIX threads are a "Unix-like system" tool, on Windows different libraries are available for threads: www.reddit.com/r/C_Programming/comments/rpd2w3/is_there_a_way_to_use_posix_standard_in_visual/. So it may be due to the fact that you are trying to use POSIX on a Windows machine, though that said I believe there are ways to use POSIX on Windows as well.

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

      @@PortfolioCourses Hello sir, thank you for your reply.I used the exact same code from your git already. Also included windows.h. Each run in Visual studio displays different answer and has different Process Ids.
      Will have a look once again at the link you shared.
      Also, thank you for the amazing explanation.You make it interesting to learn how to code. Thank you!😊

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

      @@vibhashreehippargi8233 You're welcome! 🙂 And if that's the case it makes me wonder if it's a situation where the POSIX threads just aren't supported on Windows, because it should work on a Unix-like system.

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

    may you give a tutorial about binary semaphore ..

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

      I have added that to my list of video ideas Neeraj! :-)

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

      @@PortfolioCourses okay I'll try

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

      @@Ninja_Sh11 Good luck! 🙂

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

      @@PortfolioCourses Actually , Just before my comment i had give an interview for embedded c/c++ developer in UST Global ..and asked the question about semaphore..henceforth i asked you about semaphore.... thanks for comment ..and keep it up

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

      @@Ninja_Sh11 Cool, I hope you get the job!

  • @1CProgrammer
    @1CProgrammer Год назад

    thankyou verymuch i hope you get more subs and make more good contents.

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

      You're very welcome, I'll definitely keep making more content! :-)

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

    thank you so much man

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

    very nice