Second Chance Algorithm - Page Replacement - Operating System

  Рет қаралды 234,349

BBarters

BBarters

Күн бұрын

Пікірлер: 165
@Christopher-side_dude-Murican
@Christopher-side_dude-Murican 3 жыл бұрын
Great teacher. Clear, concise and with enthusiasm. What a blessing; rare to find even decent teachers around anymore.
@devarshbhatt5612
@devarshbhatt5612 4 жыл бұрын
Great lecture sir, you literally save me around 35 mins of online lectures.
@YouKnowMeDuh
@YouKnowMeDuh 4 жыл бұрын
You, sir, gave *me* a second chance to actually learn this so I can properly implement it in my program. Thanks a ton!
@YanuarTriAdityaNugraha
@YanuarTriAdityaNugraha 10 жыл бұрын
good thing i've found this! i hope it helps me on OS exam :(
@YouKnowMeDuh
@YouKnowMeDuh 4 жыл бұрын
I hope it did, I got an OS program about this that I still need to finish lol!
4 жыл бұрын
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 жыл бұрын
Muchisimas Gracias, es muy amable por ti parte!
@samansingh1564
@samansingh1564 6 жыл бұрын
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
@denissssss8579
@denissssss8579 4 жыл бұрын
Saman Singh r u sure???
@jeffpenner6868
@jeffpenner6868 9 жыл бұрын
Very detailed analysis. Thanks for the lesson on second chance (clock) algorithm.
@Bedocalaway
@Bedocalaway 6 жыл бұрын
Best explanation of second chance on KZbin! Glad I found you 😩
@yashtamakuwala1322
@yashtamakuwala1322 8 жыл бұрын
Thanks a lot Sir. You explained it better than our reference book's explanation.
@asifnazar695
@asifnazar695 5 жыл бұрын
Perfect understanding so i appreciate and u r good teacher for the nation
@pranayramayanapu
@pranayramayanapu 7 ай бұрын
always the old videos with good content
@newschool050
@newschool050 7 жыл бұрын
awesome description .. and thanks for saving me for my mid sem exam
@calvinlau9549
@calvinlau9549 7 жыл бұрын
Very clear explanation, good use of visuals. Thank you for this video!
@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.
@KageKevSama
@KageKevSama 10 жыл бұрын
Thank you that helped me out a lot. Very straightforward and comprehensive.
@warrior100girl
@warrior100girl 5 жыл бұрын
thanks man! Still a chance to pass my OS exam. :D
@linuscastelino
@linuscastelino 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 4 жыл бұрын
xbr 10 sir ,,,, help me alot ,, thanks alot from pakistan ,,,,
@wesskhd7
@wesskhd7 9 жыл бұрын
You are the best teacher !!
@magdam3961
@magdam3961 8 жыл бұрын
Perfectly explained! Thank you!
@JoseAguirre-ri8tg
@JoseAguirre-ri8tg 3 жыл бұрын
Thank you very much, this helped me clear my doubts.
@backtashmohammadi3824
@backtashmohammadi3824 5 жыл бұрын
Best explanation ever .
@mickyo9223
@mickyo9223 6 жыл бұрын
Well put. The words at the bottom helped a lot as well. Thank you for a clean video.#allTheWayFromTexas
@MB-pt8hi
@MB-pt8hi 8 жыл бұрын
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)
@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 :)
@ApoorvaRajBhadani
@ApoorvaRajBhadani 3 жыл бұрын
Great explanation with a great example
@rex-qh9sy
@rex-qh9sy 7 ай бұрын
Awesome explanation
@nandkishorenangre8244
@nandkishorenangre8244 6 жыл бұрын
Explain very well but I found you funny haha
@truonghuynhhoa
@truonghuynhhoa 7 жыл бұрын
thanks for this lesson, it's very useful for me in the exam
@yanmoenaing71
@yanmoenaing71 4 жыл бұрын
Why Indians explain so good......?
@yveschen404
@yveschen404 9 жыл бұрын
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 жыл бұрын
陳奕甫 幹認真喔
@Morocco4e
@Morocco4e 7 жыл бұрын
because we didn't need to apply the second chance property we used normal FIFO
@ItsNavTheNavigator
@ItsNavTheNavigator 9 жыл бұрын
Only INDIAN accent :) very helpful video Thanks
@shibamdebnath683
@shibamdebnath683 2 жыл бұрын
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 8 ай бұрын
Yes. So totally 8 page faults occur right?
@yellectronix
@yellectronix Жыл бұрын
very good explanation
@youpyop
@youpyop 10 жыл бұрын
at second 7:27/9:45, why frame 5 still have 1? thank you
@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
@Premprakash-wj9dm
@Premprakash-wj9dm 5 жыл бұрын
U explained perfectly, thanks.
@RaviSharma-mh3vd
@RaviSharma-mh3vd 7 жыл бұрын
please make playlist for separate video lecture it's awesome
@narcispaduraru6859
@narcispaduraru6859 6 жыл бұрын
spacchi come la merda ...you saved my life dude ... india rulz
@golamsarwar4540
@golamsarwar4540 5 жыл бұрын
very clear to understand
@DannyHudetz
@DannyHudetz 3 жыл бұрын
Wishing this guy was my professor instead
@jackywong941
@jackywong941 7 жыл бұрын
will the reference bit become 2 or more?
@ismail8973
@ismail8973 4 жыл бұрын
Thank you sir you saved my time
@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...
@jovan_spasovic
@jovan_spasovic 6 ай бұрын
Thank you so much for a great video!
@MrKristian252
@MrKristian252 3 жыл бұрын
Does *all* of them get reset? Is this a 1 bit value (value between 1 and 0) ?
@BBarters
@BBarters 10 жыл бұрын
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 8 жыл бұрын
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.....
@perkhaahmad1136
@perkhaahmad1136 8 жыл бұрын
thank you sir its a very good lecture.
@crazeeealgorithms3236
@crazeeealgorithms3236 8 жыл бұрын
very nice explanation!!!
@muratd8428
@muratd8428 7 жыл бұрын
great teaching, thank you
@codestorywithMIK
@codestorywithMIK 8 жыл бұрын
Thank you. It was very helpful
@GamjaField
@GamjaField 7 жыл бұрын
What if same page is referenced twice? will the reference bit remain 1?
@OkSear
@OkSear 4 жыл бұрын
same thing I am wondering
@vinayak186f3
@vinayak186f3 3 жыл бұрын
My prof taught us to set the bit as 1 initially while inserting ,if I follow that way the sequence isn't same
@Emeldalala
@Emeldalala 8 жыл бұрын
This was so helpful. Thank you.
@yashbehara7525
@yashbehara7525 6 жыл бұрын
good explanation!.. cheers
@iqrabhat8193
@iqrabhat8193 9 жыл бұрын
i can say it z one of the bst video in replacmnts.. thankx a lot sir
@manish.periwal
@manish.periwal 8 жыл бұрын
reference bit of 5 when 3 comes in the (9th number) should be set to 0,since there was a page fault.
@MusicGuy423
@MusicGuy423 8 жыл бұрын
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
@sanikapatwardhan1590
@sanikapatwardhan1590 9 жыл бұрын
Thank you! Great explanation
@tirosc
@tirosc 8 жыл бұрын
I LOVE YOUR VOICE
@mrpaulcreations2172
@mrpaulcreations2172 6 жыл бұрын
Helpful lecture.
@surajmehare
@surajmehare 9 жыл бұрын
very nice explanation which is not given in to few good books.
@cagrkaymak3063
@cagrkaymak3063 8 жыл бұрын
guys there is a mistake at kzbin.info/www/bejne/rKDMfWVjo7agorc because we put 2 to end of queue so its refererence bit must be still 1 not 0
@lochuanchang1572
@lochuanchang1572 8 жыл бұрын
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 6 жыл бұрын
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 6 жыл бұрын
@@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.
@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
@shuangli5466
@shuangli5466 3 жыл бұрын
The indian accent make it that much better
@xiaoyanqu9917
@xiaoyanqu9917 7 жыл бұрын
When the first "4" comes, why did you bother "2" and check the reference bit ("2" was the "last" in)?
@Noshdudee
@Noshdudee 8 жыл бұрын
great video! thanks for the help
@AmanKumar-tu2og
@AmanKumar-tu2og 6 жыл бұрын
Thanks! Helped a lot!
@valkon_
@valkon_ 10 жыл бұрын
Nice video, but what if we have a modified bit also?
@cosma_one
@cosma_one 10 жыл бұрын
mamalis is love. mamalis is life.
@katherinelim187
@katherinelim187 7 жыл бұрын
I suggest to make ur accent clear.. btw ur the best explanator hahaha!
@ritikeshsingh5940
@ritikeshsingh5940 6 жыл бұрын
What if all pages have 1 as a reference bit ? Please answer
@umeboshi_
@umeboshi_ 15 күн бұрын
Thank you for making indonesia subtitle sir
@benaloney
@benaloney 6 жыл бұрын
Cheers Bud!
@kirtipaldayma8446
@kirtipaldayma8446 8 жыл бұрын
awesome work!!!!!!!!!!!!!11
@viplovemahi1852
@viplovemahi1852 5 жыл бұрын
Lru approximation is same as sca?
@hesahesa5665
@hesahesa5665 8 жыл бұрын
thaks very much i am understand this easy
@iamatal333
@iamatal333 9 жыл бұрын
Say, all the frames have their reference bit set to 1. Now which one is kicked out ? And what happens to the reference bits of the other frames, the frames that aren't removed ??
@joe624p
@joe624p 7 жыл бұрын
Frame 1| 1 R=1| Frame1| 1 R=0| Frame 2| 2 R=1| then Frame2| 2 R=0| 1 is replaced Frame 3| 3 R=1| Frame3| 3 R=0|
@hautrinh3139
@hautrinh3139 4 жыл бұрын
Thanks teacher
@143Pcrish
@143Pcrish 9 жыл бұрын
Good job
@Mike-vj8do
@Mike-vj8do Жыл бұрын
Thank you very much
@vinayvyraveraja7102
@vinayvyraveraja7102 10 жыл бұрын
hi good job for this video, can you come up with LRU-least used algorithm for the same example TQ
@BBarters
@BBarters 10 жыл бұрын
Its here: Study Other Page Replacement Algorithms: bbarters.com/blogBookPreview/14
@msalvi6302
@msalvi6302 4 жыл бұрын
@@BBarters If an entry is saved due to its ref_cnt being non-zero, and when there is a hit on it again, shouldn't that be considered into making the entry younger? Which means even though it came first its not older anymore because it got hit recently. With your algorithm the second hit is not considered in updating the age of the entry. I believe the entry should be marked younger .
@salookie8000
@salookie8000 9 жыл бұрын
well explained, thank you
@abhijay08
@abhijay08 10 жыл бұрын
thanks bro...helped me alot
@sarrabenabdallah3667
@sarrabenabdallah3667 4 жыл бұрын
Thank you 💓
@sarojmaharjan6394
@sarojmaharjan6394 8 жыл бұрын
in fifth and sixth iteration .....what if we have 3 and 3 instead of 5 and 2?
@lounesnaima7288
@lounesnaima7288 7 жыл бұрын
thaanks you are the best!!
@mars-d6e
@mars-d6e 2 жыл бұрын
The audio quality 🥲
@rameshpradhan2308
@rameshpradhan2308 8 жыл бұрын
I think there is mistake after time : 7:24 . Since 5 is just referenced bit of 5 should be 0 this time.
@rameshpradhan2308
@rameshpradhan2308 8 жыл бұрын
+Ramesh Khatri ho ni bro!!!
@rameshpradhan2308
@rameshpradhan2308 8 жыл бұрын
+Ramesh Khatri maile vaneko point dekhi wrong xa!! reference bit of 5 0 hunxa ani 5 replace hunxa!!
@prempandey8084
@prempandey8084 8 жыл бұрын
+Ramesh Shrestha thik chha bro. kina bhane tyo vandaa aghi ko case maa 2 oldest thiyo tara reference bit 1 hunaa le baachyo, ra aru replace vaye teivayera reference bit pani 0 vayo. Tara yo case maa pani oldest ta 2 nai ho ni, 5 laai ta kei darai vayena replace hune, sidhai 2 replace vaako ho 5 maa napugikanai, so tesko reference bit change vayena, yedi 5 oldest hudo ho ani, tyo chai replace hune condition aako vaye chai ghatthyo.
@prempandey8084
@prempandey8084 8 жыл бұрын
jun chai thyakkai tes pachhiko step maa vaihaalyo
@rameshpradhan2308
@rameshpradhan2308 8 жыл бұрын
oh i am sorry!! i was wrong!! this algorithm is 100% correct
@memoyou5493
@memoyou5493 9 жыл бұрын
At second 8.21, why we replaced 4 with 2? shouldn't it be replaced with 3 cuz 3 is older than 4? thank you
@radudunarentu4124
@radudunarentu4124 9 жыл бұрын
+Memo salem you are right, he made a mistake.
@prasoondavid5874
@prasoondavid5874 7 жыл бұрын
well 3 is the latest entry !!
@ga9526
@ga9526 5 жыл бұрын
confusion starts at 7:06
@fakegamer9025
@fakegamer9025 5 жыл бұрын
Why? Watch carefully dude
@pujanshah4664
@pujanshah4664 9 жыл бұрын
Awesome.
@GoCanucks89
@GoCanucks89 9 жыл бұрын
thank you vally much
@AKLESHKUMAR-dr3vm
@AKLESHKUMAR-dr3vm 5 жыл бұрын
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.
@ImperatorM
@ImperatorM 7 жыл бұрын
Very Big Mistake. It is not as easy as shown in this video. You have to think in a "clock". After 2 has got his second chance, it went to the end of the Queue, so it is not the "oldest" one, it is the "younges" one.
@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
@albamustafaj5454
@albamustafaj5454 6 жыл бұрын
This is wrong, at 4:00 2 should go at the end of the table and its R bit should become 0. It shouldn't stay in the beginning of the table you are violating the rule
@aminostemo6179
@aminostemo6179 10 жыл бұрын
thank you
@kazishohel9358
@kazishohel9358 10 жыл бұрын
thanks bro........
@Alextauren1
@Alextauren1 4 жыл бұрын
Thanks apu
@DestructChen
@DestructChen 8 жыл бұрын
thanks mate :)
Second Chance Page Replacement Algorithm in OS   Solved Problem
13:27
Simple Snippets
Рет қаралды 58 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 154 МЛН
2nd Chance Algorithm Example
6:43
Casey Cole
Рет қаралды 39 М.
Lec52:Second Chance Page Replacement Algorithm.
14:58
Engineering Wing
Рет қаралды 10 М.
FIFO,LRU AND OPTIMAL PAGE REPLACEMENT ALGORITHMS | OPERATING SYSTEMS
20:29
Last moment tuitions
Рет қаралды 739 М.
Second Chance Algorithm
10:04
Dr. Robert Dimpsey
Рет қаралды 50 М.
What Is Dynamic Programming and How To Use It
14:28
CS Dojo
Рет қаралды 1,6 МЛН
Least Recently Used (LRU) Explanation
6:35
Tech Academy
Рет қаралды 479 М.
Lec29 Page Replacement Algorithms | LRU and optimal | Operating Systems
16:18
Jenny's Lectures CS IT
Рет қаралды 417 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 154 МЛН