Second Chance Algorithm - Page Replacement - Operating System

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • In this video, we learn the second chance algorithm for page replacement.
    C programming series: • Introduction to Pointe...
    C++ programming series: • Reference in C++ (Epis...

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

  • @Christopher-side_dude-Murican
    @Christopher-side_dude-Murican 3 года назад +11

    Great teacher. Clear, concise and with enthusiasm. What a blessing; rare to find even decent teachers around anymore.

  • @YouKnowMeDuh
    @YouKnowMeDuh 4 года назад +12

    You, sir, gave *me* a second chance to actually learn this so I can properly implement it in my program. Thanks a ton!

  • @devarshbhatt5612
    @devarshbhatt5612 4 года назад +13

    Great lecture sir, you literally save me around 35 mins of online lectures.

  • @YanuarTriAdityaNugraha
    @YanuarTriAdityaNugraha 9 лет назад +19

    good thing i've found this! i hope it helps me on OS exam :(

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

      I hope it did, I got an OS program about this that I still need to finish lol!

  • @jeffpenner6868
    @jeffpenner6868 9 лет назад +5

    Very detailed analysis. Thanks for the lesson on second chance (clock) algorithm.

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

    Im from Mexico, you have amazing skills for tech, thank you very much , i watch a lot of videos, and yours it the only one that i understand at 100%

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

      Muchisimas Gracias, es muy amable por ti parte!

  • @pranayramayanapu
    @pranayramayanapu 4 месяца назад

    always the old videos with good content

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

    Best explanation of second chance on RUclips! Glad I found you 😩

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

    Perfect understanding so i appreciate and u r good teacher for the nation

  • @jovan_spasovic
    @jovan_spasovic 3 месяца назад

    Thank you so much for a great video!

  • @samansingh1564
    @samansingh1564 5 лет назад +18

    There is an error here after 5:05. When Page 4 is to be brought into memory, the pointer that acts as head of round-robin replacement(i.e. from where we start the replacement Algo) points at Page 1 and hence, the reference bit of Page 2 will not be changed since Page 1 will be replaced immediately!
    Refer : www.mathcs.emory.edu/~cheung/Courses/355/Syllabus/9-virtual-mem/SC-replace.html

  • @yashtamakuwala1322
    @yashtamakuwala1322 8 лет назад

    Thanks a lot Sir. You explained it better than our reference book's explanation.

  • @rex-qh9sy
    @rex-qh9sy 4 месяца назад

    Awesome explanation

  • @newschool050
    @newschool050 7 лет назад

    awesome description .. and thanks for saving me for my mid sem exam

  • @MB-pt8hi
    @MB-pt8hi 8 лет назад +5

    I think there is a big mistake. When R of B is 1 and you reset it to 0, then you have to move B to the tail of the list (see Book of Tanenbaum Page 212)

  • @KageKevSama
    @KageKevSama 9 лет назад

    Thank you that helped me out a lot. Very straightforward and comprehensive.

  • @calvinlau9549
    @calvinlau9549 7 лет назад

    Very clear explanation, good use of visuals. Thank you for this video!

  • @magdam3961
    @magdam3961 8 лет назад +1

    Perfectly explained! Thank you!

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

    very good explanation

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

    Well put. The words at the bottom helped a lot as well. Thank you for a clean video.#allTheWayFromTexas

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

    thanks man! Still a chance to pass my OS exam. :D

  • @wesskhd7
    @wesskhd7 8 лет назад

    You are the best teacher !!

  • @JoseAguirre-ri8tg
    @JoseAguirre-ri8tg 2 года назад

    Thank you very much, this helped me clear my doubts.

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

    What happens when all the candidates have their reference bits set to 1?
    For example :
    Input - 1 2 3 4 4 3 2 1 5
    Frame size - 4

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

      @raj sharma and set all the ref bits to 0, right?

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

      All the reference bits get set to 0. Then FIFO applied. In your example, 1 will be replaced.

  • @khan-zv6ox
    @khan-zv6ox 3 года назад

    xbr 10 sir ,,,, help me alot ,, thanks alot from pakistan ,,,,

  • @nandkishorenangre8244
    @nandkishorenangre8244 6 лет назад +4

    Explain very well but I found you funny haha

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

    Best explanation ever .

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

    Wishing this guy was my professor instead

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

    Great explanation with a great example

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

    Thank you sir you saved my time

  • @kishanchand8456
    @kishanchand8456 9 лет назад

    @BBaters ,in 3'rd last table , search will start from old to new (since it is arranged in FIFO) and among 4,5,and 3 (in previous table) 4 is oldest .search will stop at 4 only.and 5 's R bit will remain 1.

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

    very clear to understand

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

    Thanks teacher

  • @Mike-vj8do
    @Mike-vj8do Год назад

    Thank you very much

  • @yveschen404
    @yveschen404 9 лет назад +11

    why the ninth page 5's reference bit is still set to 1 ? 2 is already set to 3 , doesn't set the 5's reference bit to 0? sorry about my poor language

    • @orzn100
      @orzn100 9 лет назад +1

      陳奕甫 幹認真喔

    • @Morocco4e
      @Morocco4e 7 лет назад

      because we didn't need to apply the second chance property we used normal FIFO

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

    Why Indians explain so good......?

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

    thanks for this lesson, it's very useful for me in the exam

  • @Premprakash-wj9dm
    @Premprakash-wj9dm 5 лет назад

    U explained perfectly, thanks.

  • @codestorywithMIK
    @codestorywithMIK 7 лет назад

    Thank you. It was very helpful

  • @crazeeealgorithms3236
    @crazeeealgorithms3236 7 лет назад

    very nice explanation!!!

  • @sandundeemantha34
    @sandundeemantha34 23 дня назад

    Thank you

  • @muratd8428
    @muratd8428 7 лет назад

    great teaching, thank you

  • @Noshdudee
    @Noshdudee 8 лет назад

    great video! thanks for the help

  • @AmanKumar-tu2og
    @AmanKumar-tu2og 5 лет назад

    Thanks! Helped a lot!

  • @Emeldalala
    @Emeldalala 8 лет назад

    This was so helpful. Thank you.

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

    Nice work, concise, easy to understand! Thank you, as an American I appreciate how well you explain and how clear your english is :)

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

    spacchi come la merda ...you saved my life dude ... india rulz

  • @ItsNavTheNavigator
    @ItsNavTheNavigator 8 лет назад +1

    Only INDIAN accent :) very helpful video Thanks

  • @sanikapatwardhan1590
    @sanikapatwardhan1590 9 лет назад

    Thank you! Great explanation

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

    good explanation!.. cheers

  • @perkhaahmad1136
    @perkhaahmad1136 8 лет назад

    thank you sir its a very good lecture.

  • @hesahesa5665
    @hesahesa5665 7 лет назад

    thaks very much i am understand this easy

  • @RaviSharma-mh3vd
    @RaviSharma-mh3vd 7 лет назад

    please make playlist for separate video lecture it's awesome

  • @kirtipaldayma8446
    @kirtipaldayma8446 8 лет назад

    awesome work!!!!!!!!!!!!!11

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

    Helpful lecture.

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

    Thanks apu

  • @lounesnaima7288
    @lounesnaima7288 7 лет назад

    thaanks you are the best!!

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

    Cheers Bud!

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

    My prof taught us to set the bit as 1 initially while inserting ,if I follow that way the sequence isn't same

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

    will the reference bit become 2 or more?

  • @GoCanucks89
    @GoCanucks89 9 лет назад +1

    thank you vally much

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

    The indian accent make it that much better

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

    Thank you 💓

  • @salookie8000
    @salookie8000 9 лет назад

    well explained, thank you

  • @pujanshah4664
    @pujanshah4664 9 лет назад

    Awesome.

  • @tirosc
    @tirosc 8 лет назад

    I LOVE YOUR VOICE

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

    Thank£

  • @abhijay08
    @abhijay08 9 лет назад

    thanks bro...helped me alot

  • @iqrabhat8193
    @iqrabhat8193 8 лет назад

    i can say it z one of the bst video in replacmnts..
    thankx a lot sir

  • @143Pcrish
    @143Pcrish 9 лет назад

    Good job

  • @byeonggonlee8569
    @byeonggonlee8569 8 лет назад

    very helpful

  • @lochuanchang1572
    @lochuanchang1572 8 лет назад +7

    A big mistake, When a page gets a second chance, its reference bit is cleared, and
    its arrival time is reset to the current time.

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

      Due to this page it is not:
      www.mathcs.emory.edu/~cheung/Courses/355/Syllabus/9-virtual-mem/SC-replace.html
      Look at the 12th and 14th point starting from the beginning.

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

      To my lecture notes what lochu'an says it's right. A page who gets a second chance won't be replace till all other pages have been replaced or given a second chance . This is due to fifo

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

      I think, he did the same. Didn't he? Page 2 had it's reference bit as 1. It was given a second chance when 5 had to be brought in. 5 was brought in, in place of 3. The reference bit of page 2 was made as 0. Did he not do it at a later point of the problem for a different instance?

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

      @@shivajibalijepalli565 It is Fifo order and the get a set in fifo order. When they get second chance bit is cleared and page arrival time is set to current time.

  • @BBarters
    @BBarters  9 лет назад

    yousri mami frame 5 is still there because, its reference bit is set to 1....when a frame's reference bit is set to 1, it doesn't get replaced instead its given one more chance at the expense of setting its reference bit to 0 making it eligible for replacement next time.

    • @_-ghost-_711
      @_-ghost-_711 7 лет назад +4

      but when 3 gets added at 7:24 all the reference bit should be set to 0......but u have set reference bit of 5 to 1......please explain.....

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

    Does *all* of them get reset?
    Is this a 1 bit value (value between 1 and 0) ?

  • @manish.periwal
    @manish.periwal 7 лет назад

    reference bit of 5 when 3 comes in the (9th number) should be set to 0,since there was a page fault.

    • @MusicGuy423
      @MusicGuy423 7 лет назад +1

      I don't believe that's the case since 5 is not the number that is going to be replaced. Since 2 was the first number in, 2 is going to be replaced so 5 and its reference bit is not affected

  • @katherinelim187
    @katherinelim187 7 лет назад

    I suggest to make ur accent clear.. btw ur the best explanator hahaha!

  • @surajmehare
    @surajmehare 8 лет назад

    very nice explanation which is not given in to few good books.

  • @Taragurung
    @Taragurung 9 лет назад

    So the reference bit is set to 1 only when there is page hit . ? if there suppose 5 got second chance and after that we have to replace another bit which is completely new and not in the frame. So we go through FIFO in that or which page will get a second chance

  • @xiaoyanqu9917
    @xiaoyanqu9917 7 лет назад

    When the first "4" comes, why did you bother "2" and check the reference bit ("2" was the "last" in)?

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

    tnq sir ji

  • @kazishohel9358
    @kazishohel9358 9 лет назад

    thanks bro........

  • @valkon_
    @valkon_ 9 лет назад +2

    Nice video, but what if we have a modified bit also?

    • @cosma_one
      @cosma_one 9 лет назад

      mamalis is love. mamalis is life.

  • @DestructChen
    @DestructChen 7 лет назад

    thanks mate :)

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

    thnks!

  • @GamjaField
    @GamjaField 7 лет назад +1

    What if same page is referenced twice? will the reference bit remain 1?

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

      same thing I am wondering

  • @smalltugz
    @smalltugz 9 лет назад

    my teacher says when a new frame is entered the ref bit is set to one what kind of variation is that if it is right

  • @khan-zv6ox
    @khan-zv6ox 3 года назад

    anyone. why the reference bit again set 1 for 5 in second line B/C there is page fault (2 replace with 3). so we need to change the reference bit of 5 to 0??????? please any one .. so confuse...

  • @tutorialsviewers1381
    @tutorialsviewers1381 7 лет назад

    Helpfull :)

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

    The audio quality 🥲

  • @nerrixj.l.6102
    @nerrixj.l.6102 5 месяцев назад

    ❤️❤️❤️

  • @youpyop
    @youpyop 9 лет назад

    at second 7:27/9:45, why frame 5 still have 1? thank you

  • @cagrkaymak3063
    @cagrkaymak3063 8 лет назад +4

    guys there is a mistake at ruclips.net/video/voiL2-nQmlU/видео.html because we put 2 to end of queue so its refererence bit must be still 1 not 0

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

    What if all pages have 1 as a reference bit ? Please answer

  • @sarojmaharjan6394
    @sarojmaharjan6394 8 лет назад

    in fifth and sixth iteration .....what if we have 3 and 3 instead of 5 and 2?

  • @AKLESHKUMAR-dr3vm
    @AKLESHKUMAR-dr3vm 4 года назад

    sir you have done a small mistake when 9 th page replacement when 4 will came then 3 will be out bcz 3 is the oldest not 4.

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

    In the 7:06th minute reference bit for 5 should have changed to 1 right ? after replacing 2 with 3 in first row. Please confirm

    • @VimalKumarAB
      @VimalKumarAB 5 месяцев назад

      Yes. So totally 8 page faults occur right?

  • @yavuzkagantopak1854
    @yavuzkagantopak1854 8 лет назад

    thank you sir !!!

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

    Lru approximation is same as sca?

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

    osam

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

    If I didn't miss something, no explanation how to know which page is older than those whose look is marked with 0