Banker's Algorithm explained

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

КОМЕНТАРІ • 154

  • @CatKin76
    @CatKin76 8 років тому +89

    At 6:04 why is P1 False ? It is less than (or equal to) 0750 is it not ? I kno I'm missing something here ..... please help ...

    • @ComputerScienceExplained
      @ComputerScienceExplained  8 років тому +137

      Ok so we have we are asked if we can give , you have to remember that this is a matrix not the numbers 1,532 and 750. We compare 1 with 0, 5 with 7, 3 with 5 and 2 with 0. If we look at it like this, we see that we cannot actually allocate the amounts required. Hope that explains it =).

    • @CatKin76
      @CatKin76 8 років тому +13

      I'll watch it again but yes i think I know what you mean as i thought it was the whole numbers at first but then the last few sets kind of threw that out of the window. I'll get a grasp of it, thanks :-)

    • @ComputerScienceExplained
      @ComputerScienceExplained  8 років тому +8

      No problem =)

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

      @@ComputerScienceExplained nice tutorial atleast you should have mentioned that

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

      I was confused as well lol

  • @SuperSmitty9999
    @SuperSmitty9999 4 роки тому +5

    I like how you didn't skip any of the steps! Even though I skipped past some of the arithmetic I knew, if I were confused all the examples would have helped!! Also, bravo.

  • @marioskasolas9210
    @marioskasolas9210 5 місяців тому +1

    After 7 years as i give os , very helpful video surely recommend!

  • @Bv1.00
    @Bv1.00 2 роки тому +1

    I usually don't comment on videos, but this was well explained and simplified the steps nicely. I was struggling to find out what to do with my available and need and it ended up helping me understand it well. Thank you.

  • @roboter8666
    @roboter8666 23 дні тому

    thank you so much, I study BSc computer science and this helped

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

    Finally a real English video rather than a Indian English one.

  • @MisanthropyPure
    @MisanthropyPure Рік тому +1

    You are a savior. Thanks

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

    You explain better than my professor ! Keep up the good work

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

    thanks bro... today is my Exam and this video has helped me for last hour preparation

  • @alexanderg.5426
    @alexanderg.5426 4 місяці тому

    i have no clue how my professor made it seem so complicated when in reality its that fucking simple wow. thank you very much!

  • @sabinomuniz5542
    @sabinomuniz5542 Рік тому +1

    Clear and simple, thank you for explaining very clearly and well.

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

    You, sir, saved me a lot of headaches today. I'll drink to that

  • @Butter9322
    @Butter9322 Рік тому +1

    This was so helpful and well explained. Thank you!

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

    Bro I have operating system exam tomorrow and this video really saved me 😭 thanks and i would appreciate if you can share more knowledge about os. Love the way you explain

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

    Awesome work, much better than all Indians all together

  • @AQHackAQ
    @AQHackAQ 7 років тому +148

    Finally explanation video on OS without an annoying Indian accent...

  • @TheHickjc1222
    @TheHickjc1222 2 роки тому +1

    Very good video!

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

    Thx so much for the explanation in detail!

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

    Really nice video, clear and concise, thanks!

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

    Great explanation.Thanks

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

    Thank you sir for the helpful video!

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

    Thanks for the Tutorial sir, It helped me understand this algorithm. Stay safe :)

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

    Thanks for the video.

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

    During the steps in 3:06 where you caclulated the need, is is possible for any values in the max matrix for any process be smaller than the values in the allocation matrix for the same process?

  • @omkarjere
    @omkarjere 7 років тому

    The most clear explanation, Thank you!

  • @ronaldjavier7611
    @ronaldjavier7611 10 місяців тому

    Great explanation

  • @batnoy779
    @batnoy779 11 місяців тому

    when we doing step 2, must we do the P0 firstly? Can I start with with other, say, like P3 first?

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

    Excellent top notch video, very easy to understand in simple language, thanks a lot. Thanks🙏🙏🙏🙏 made me easy to understand bankers algorithm

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

    In case the PX (processes I guess) have a priority, you should check if it is possible to acomodate the allocation request after the next new available, instead of checking it at the end of the PX sequence. This will give you a different sequence based on PX priorities.

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

      This will require original PX sequence is sorted by priority

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

    Thank you very much !!

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

    You saved me for my final today!

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

    Hey, why we skip Allocation p1 (1000) in 6:14 ?

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

    Dijkstra was a fucking algorithm god, next to you buddy, thank you so much for this video

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

    Well explained thank you

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

    Good job! Thanks!

  • @sanchitagarwal8764
    @sanchitagarwal8764 7 років тому

    Really nice and quick explanation!

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

    Thanks for the vid really helpfull!

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

    thanks a lot,very good explanation

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

    Where do those original numbers in the matrix come from? At 3:06

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

    popping in because I have assignment due in three hours and I haven't listened to a word in the lecture
    Thanks! I know nothing about the context but I can now do my assignment sheet no problem.

  • @mesoweeehee1654
    @mesoweeehee1654 7 років тому +1

    Thanks. It's really helpful.

  • @glowsand229
    @glowsand229 7 місяців тому

    Thank you mr computer

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

    Yo mah dude. Sick af tut👏🏼👏🏼

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

    question: what if Max - Allocation in step 1 already is not possible with my given numbers... what then???

  • @Darieee
    @Darieee 7 років тому +1

    Thanks man !

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

    sat before an exam watching this thinking this guy is a god lmao

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

    good!Explain very well

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

    exam in 8 hours, thx mate

  • @loganmarsh3584
    @loganmarsh3584 Рік тому +1

    Thanks 🙏

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

    Could you do an example where it is not safe? My final is next monday and it is only on deadlock avoidance RAG and bankers algorithm.

  • @AlbertIsrael
    @AlbertIsrael 7 років тому

    Thanks for this! Very helpful tutorial 🙂

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

    What about the unsafe sequence? Do we just reverse the condition when comparing with the need and the available from true to false?

  • @puneetsehgal8200
    @puneetsehgal8200 7 років тому

    Hey, I have a Question is that possible that Allocation value can be bigger than Max value e.g. P1 - A(column) - Allocation = 2 and P1- A Max = 1? Is yes, then what would be the value for the Need?

  • @dustinhaxton1994
    @dustinhaxton1994 7 років тому

    Great video!!

    • @eswarreddy4769
      @eswarreddy4769 7 років тому

      how did it become false in the second case.... help me out

    • @ManjeetKumar-qm1gr
      @ManjeetKumar-qm1gr 7 років тому

      Because 7 is not less than 5 and 5 is not less than 3. We have to compare the respective bits while doing 0750

  • @sricharita9265
    @sricharita9265 7 років тому +1

    Thanks for the help!! Awesome to the point video.

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

    what happens if there is a follow up question that p4 has requested additional resources determine if this can be granted immediately, is it the same method as you have shown using new available from P1?

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

      Correct, the algorithm does not differ.

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

      @@ComputerScienceExplained Thanks, when I searched my question on UA-cam there is a separate request algorithm simmilar to what you have shown that is used to update the resource table and then uses bankers algorithm from there to determine new sequence. Are you aware of this, or is that just another method?

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

      Can't say I recall it off the top of my head but you're welcome to post it in here for anyone interested =).

  • @mimic.channel
    @mimic.channel 6 років тому +1

    thx this video, so helpful

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

    Sry but how did 1520 come from i mean is it a dynamic number it is concluded ? in one word how did available come from "? thank you

  • @akanopoi6177
    @akanopoi6177 7 років тому

    thanks alot !!! really helps

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

    how did you find current available ? 1520 ?

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

    What if in Step one we have a negative result? for example: - How to do in this case to generate the Need Matrix?

    • @ActualDayZGod
      @ActualDayZGod 6 років тому +3

      This would be impossible. The banker's algorithm requires you to know ahead the maximum amount of resources will be used by the process. In your case, it means that we predict the wrong maximum amount of resources required by that process. This is actually the disadvantage of banker's algorithm as you cannot have a process that is "dynamic" in the sense you dont know how much it will require the resources

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

      @@ActualDayZGod thank you bro, regards from Russia :)

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

      @@robertoenriquechavezrodrig731 :)👍

  • @njabulomaduna450
    @njabulomaduna450 7 років тому

    why does your allocation numbers switch with allocation numbers when you are calculating the availability

  • @alantrammel7179
    @alantrammel7179 7 років тому +1

    Thanks Slaven!

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

    THANKS!

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

    based on the problem given, how to determine which one is a maximum or an allocation?

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

    So i didnt have to recalculate P1, after P4🤔

  • @samirvzw
    @samirvzw 8 років тому +3

    and this guy knows how to fish....win win

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

    Thank you!

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

    Thank you for your great video, however I wonder why they do not check available with need from random P ? why we start at P0 ? If it is stupid question Iam sorry :( @Slaven P

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

    my question doesn't have available, how do i get it?

  • @awekeningdragon7524
    @awekeningdragon7524 7 років тому

    i am in doubt here. ok, shouldnt the last available matrix be equal to the total allocation ?
    PLZ help clear my doubt

    • @bestsmulesever7197
      @bestsmulesever7197 7 років тому

      yea.. Sure.. The Last Available Resources Will be Equal to The Total number Of Resources!
      Since All Process Done Processing and Release Every Resource they have!

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

    Why don't you go back to processes 1 and check again after u allocate from p2. What happens if you just keep getting more and more process, p1 wont have another chance and will starve.

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

    what if it was still lesser than P1 so the comparison stayed false what would we say ?

  • @semanur69
    @semanur69 11 місяців тому

    good question

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

    Im confused, P0, 0000

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

    can you explain why p1 is false before my final tomorrow?

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

    THANK YOU!!!

  • @mehyeddinahmad411
    @mehyeddinahmad411 7 років тому

    on what program you made this video

  • @praveenc.k.4811
    @praveenc.k.4811 7 років тому

    thank you very much

  • @jayteko
    @jayteko 7 років тому +1

    Thanks, really helpful!

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

    thanks sir!!!

  • @advvijaysingh6147
    @advvijaysingh6147 7 років тому

    superb.

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

    Thank you!!!!!!!!!

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

    new available = available - need(requested) if true. Adding allocated to the available is wrong LOL

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

      We can add allocated to available if the process work is done. That can be done by having any array work[] and check for every process i if work[i] == true;

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

      Seems you're not understanding the algorithm. I encourage you to study a bit more and revisit the video at a later time.

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

      @@ComputerScienceExplained
      Need := Max - Allocation
      Check that Request[i]

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

      Thank you for your amazing tutorial.
      What I noticed is that you adding the allocation to the available. That only can be done when a process is done working. when you compared needed to available you added allocation to available and that make no sense. As I learned we compare only to know if we can allocate .

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

    Please clear the point how is p1 not less than 1532

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

      Hi, please check pinned comment. Pay close attention to the language used (number, matrix, matrices)

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

      Slaven P thankyou so much sir...it helped me

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

    nice

  • @thienay3899
    @thienay3899 7 років тому +1

    Tks Bro !!

  • @tapaswinisingh7299
    @tapaswinisingh7299 7 років тому +1

    thanks :)

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

    Can we say that ABCD are our resources?

  • @tejag9342
    @tejag9342 7 років тому

    Is that answer 2 14 12 12 is right i m get other answer...

  • @danakassir674
    @danakassir674 7 років тому

    thanks

  • @Teaheey
    @Teaheey 7 років тому

    so... we're gonna go ahead and go ahead to be gonna to go ahead

  • @lashra
    @lashra 2 роки тому +1

    thx for nice accent

  • @samuelevendramin3221
    @samuelevendramin3221 7 місяців тому

    ti meriti un bacino

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

    the pluggg

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

    put on 1.25 speed

  • @blessingkamtayeni98
    @blessingkamtayeni98 7 років тому

    interesting

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

    Kindly revise; Isn't the correct Safe state = [P0, P2, P1, P3, P4]?

  • @MrSnypa19
    @MrSnypa19 7 років тому

    Go Ospreys

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

    SOOOOOOOOOOOOU