Lecture 29: Page Replacement Algorithms || How to implement LRU algorithm?

Поділитися
Вставка
  • Опубліковано 5 сер 2024
  • This video provides an engaging glimpse of Page Replacement Algorithms in Operating System
    Email ID for Testimonials: coderstrek@gmail.com
    There is a lot to learn, Keep in mind “ Mnn bhot karega k chor yrr apne se nahi hoga ya maza nahi aara, Just ask 1 question “ Why I started ? “
    Visit Crio: bit.ly/34gXEIr
    Slides:drive.google.com/file/d/112po...
    Notes: drive.google.com/file/d/1_FTH...
    Discord Server Link: / discord
    Do provide you feedback in the comments, we are going to make it best collectively.
    Connect with Lakshay:
    Instagram: lakshayk12...
    LinkedIn: / lakshay-kumar-368a06146
    Connect with Babbar here:
    Instagram: / lovebabbar1
    Twitter: / lovebabbar3
    Telegram Group Link: Love Babbar CODE HELP
    telegram.me/lovebabbercodehelp
    My Editor: rishu.rsing...
    TimeStamps:
    00:00 - Introduction
    01:10 - Promotion
    02:06 - What is Page fault?
    05:47 - FIFO Page replacement algorithm
    13:00 - Belady's Anomaly
    16:25 - Optimal Page replacement algorithm
    22:34 - LRU Page replacement algorithm
    28:20 - Methods to implement LRU cache/algorithm
    37:50 - Least frequently used algorithm
    39:11 - Most frequently used algorithm
    Intro Sequence: We have bought all the required Licenses of the Audio, Video & Animation used.
    #OSBusted #Lakshay

КОМЕНТАРІ • 94

  • @rabbanimunna6992
    @rabbanimunna6992 Рік тому +19

    Earlier I was very weak in OS concepts, after watching your series I can say with utmost confidence that I am super confident in OS. Thanks for making our lives easy. Loved this series.

  • @shivanshvish4879
    @shivanshvish4879 Рік тому +2

    I have binged watch this series successfully with no interruption. It was I can say the most practical and knowledgeable series in OS. This is how our education system should look like

  • @rohitantil9534
    @rohitantil9534 2 роки тому +13

    This OS series is very amazing ❤️ thank you lakshay bhai❤️❤️

  • @devendrasuthar5530
    @devendrasuthar5530 Рік тому +9

    Bhaiya your OS series was really amazing as DB I have watched both series and I am from mechanical background. waiting for you next series on computer networks.

  • @smanivesh
    @smanivesh 2 роки тому +13

    Os k baad ab DBMS start krna please🙏

  • @VIJAYKUMAR-dj6kf
    @VIJAYKUMAR-dj6kf Рік тому +4

    honestly, it's an awesome course, followed it so far and would suggest to those checking comments for how the course actually is, thank you bhaiya

  • @ayushraj6525
    @ayushraj6525 2 роки тому +5

    Lru cache implement kar liya bhaiya. Implemented it using orderedDict in python.. Maza aagya 😃

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

    Thank you so much for all the effort, it is Highly appreciated :)

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

    very grateful to babbar bhaiya , such a nice course , legit attended all the videos of this course which made my confidence so highhh

  • @anishborse1924
    @anishborse1924 2 роки тому +2

    Great efforts, I appreciate your efforts.

  • @srajittanwar636
    @srajittanwar636 2 роки тому +2

    Was waiting for it🔥

  • @reisewithNeelam
    @reisewithNeelam 2 роки тому +2

    Valuable series . Thankyou...

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

    Best Underrated operating system course

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

    thankyou so much sir for your efforts i highly appreciate your hardwork

  • @Ankit.yt_885
    @Ankit.yt_885 2 роки тому +1

    Amazing series!

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

    Thankyou sir! very useful series

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

    jod course, liked it very much😀😀😀

  • @ankushladani496
    @ankushladani496 2 роки тому +2

    Maja aa gaya bhai....

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

    What a playlist sir really greatttttt🙌🙌🙌

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

    Thanks bhaiya for this awesome series

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

    Amazing.....
    Thank you bhaiya

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

    Sir amazing video very nice 😇😇😇😊😊

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

    Best playlist
    Hope next on Computer Network.

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

    Bhaiya maza aa gaya

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

    Awsome Series Lakshay Sir

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

    Thanks for this amazing lecture

  • @Solar.talk07
    @Solar.talk07 Рік тому

    Amazing course 👍

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

    Sir i watched full playlist and help of this video i passed the college exam with nice grade thank you sir and in my 2nd sem I'll watch full dbms playlist ☺️🙂

  • @TechUprise-by-Jyoti
    @TechUprise-by-Jyoti 2 роки тому +1

    Thank you bhaiya😇

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

    great 🔥🔥

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

    Awsm. twist when the best technique is not possible!
    Note: - This comment
    is with refernce to the Optimal Page Replaccement Algorithm.

  • @UECAshutoshKumar
    @UECAshutoshKumar 3 дні тому +1

    Thank you 😊

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

    superb

  • @SardarCoder
    @SardarCoder 11 місяців тому +1

    Done bhai❤

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

    awesome

  • @dhairyataneja3211
    @dhairyataneja3211 2 роки тому +18

    Bhaiya ek computer networks for placements pe bhi bna do...

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

    Very nice video

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

    Nice Efforts in the series. By far one of the best.

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

    Present 🙋🏻‍♀️

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

    Great 👍👍👍👍

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

    implement kr li bhaiya

  • @063himanshumishra4
    @063himanshumishra4 2 роки тому

    Bhaiya moj kr diii

  • @KACodes
    @KACodes 2 роки тому +6

    Starting me motivation kam thi kyuki subjective topic hai to neend aati thi...
    But ab importance samajh aa rahi hai OS ki to ab value pata chali hai is course ki

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

    nice series

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

    lakshya ...the best

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

    Very nice

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

    we can use set pair to implement counter .In which first will be the counter and second is value

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

      we can also implement it by using circular array concept . In the above example as discussed in lecture keep a array of size 3 after each time will update i to (i+1)%3 .

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

    great

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

    Why cant we use a queue instead of stack in LRU?

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

    How will you remove pages from the end of the stack in case of LRU

  • @HARSHSharma-yf9og
    @HARSHSharma-yf9og 11 місяців тому

    I mean certain pages would have a valid/invalid bit as 1 since the ram has the capacity to hold three pages according to the said situation.Hence if the pages are present in RAM than the page fault would occur. ONLY in the scenario where all the demanded pages are new that 15 page faults can occur.

  • @shindeprem228
    @shindeprem228 15 днів тому

    LRU ka counter wale approach ko implement krne ke liye hashmap use krna hai kya

  • @user-wu4ww8em5b
    @user-wu4ww8em5b 11 місяців тому

    can we implement the lru with mean heap with custom ??

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

    🔥🔥🔥

  • @gauravsinha3032
    @gauravsinha3032 6 місяців тому +1

    Please make video on computer network

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

    Can simply use a priority queue for lru

  • @Aditya-rs5dj
    @Aditya-rs5dj 2 роки тому

    Implemented

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

    Implemented LRU Cache 👍🏻

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

    completed whole playlist in one day, exam time killls now going to sleep

  • @cooldude0321
    @cooldude0321 28 днів тому

    08/07/24 page replacement algos cleared++ Lakshay bhaiyaa

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

    implemented

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

    🙏😍

  • @HARSHSharma-yf9og
    @HARSHSharma-yf9og 11 місяців тому +1

    I think there are less page faults than 15 in FIFO.

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

    plz Computer networks ki playlist laao bhaiyaa

  • @gopalagrawal8378
    @gopalagrawal8378 2 роки тому +2

    Is this playlist is completed for placement?

  • @PradeepKumar-kd1dm
    @PradeepKumar-kd1dm 8 місяців тому

    bhai maza aya khatam krke ye playlist

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

    Day 29 done✓

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

    Maine Video Pura dekha

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

    cat aagyi pichhe se😁😁 12:58

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

    ye java development mei kaam aayega?

  • @NavneetKumar-nt8mc
    @NavneetKumar-nt8mc 2 дні тому

    prioirty queue se implement ho jaiga

  • @AbhishekKumar-dl6ko
    @AbhishekKumar-dl6ko Місяць тому

    Day 29 done ...10/06/24

  • @SURAJKUMAR-bv8vp
    @SURAJKUMAR-bv8vp 2 роки тому

    Sir start dbms asap plz

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

    How is LRU different from FIFO?

    • @AnmolSingh-rf3zt
      @AnmolSingh-rf3zt 2 роки тому +1

      FIFO is about entry of the earliest page. LRU is about earliest usage of a page due to which it is pushed to the stack top even when it is already present in the frames.

  • @ShivamKumar-yn9wb
    @ShivamKumar-yn9wb Рік тому

    this series doesnt has system calls.please add

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

    Comment++

  • @prajjawalsingh4952
    @prajjawalsingh4952 4 дні тому

    class Node
    {
    public:
    int a, b;
    Node *pre;
    Node *next;
    Node()
    {
    pre = NULL;
    next = NULL;
    a = -1;
    b = -1;
    }
    };
    class LRUCache
    {
    public:
    map mp;
    Node *head = new Node();
    Node *tail = new Node();
    int cap;
    LRUCache(int capi)
    {
    this->cap = capi;
    head->next = tail;
    tail->pre = head;
    mp.clear();
    }
    void add(Node *a)
    {
    a->pre = head;
    Node *rt = head->next;
    a->next = rt;
    head->next = a;
    rt->pre = a;
    }
    void deletenode(Node *a)
    {
    Node *pr = a->pre;
    Node *nx = a->next;
    pr->next = nx;
    nx->pre = pr;
    }
    void put(int a, int b)
    {
    if (mp.find(a) != mp.end())
    {
    deletenode(mp[a]);
    add(mp[a]);
    mp[a]->b=b;
    return ;
    }
    if (mp.size() == cap)
    {
    mp.erase(tail->pre->a);
    deletenode(tail->pre);
    }
    Node* p=new Node();
    p->a=a;
    p->b=b;
    add(p);
    mp[a]=p;
    return ;
    }
    int get(int a)
    {
    if (mp.find(a) == mp.end())
    return -1;
    deletenode(mp[a]);
    add(mp[a]);
    return mp[a]->b;
    }
    };
    LRU CATCHE iMPLEMENTATION

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

    Mai abhi mobile par video dekh raha hun, time abhi 22:16 hai video mai, from start till this point I'm only seeing "In Japan" picture on the screen. Is this happening only with me?

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

    In a way we can say that (iv) Counters method is a Doglapan 😂

  • @MSDHONI___
    @MSDHONI___ 11 місяців тому +1

    *****

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

    Sir make next class on computer architecture & Organization 🙏🙏🙏🙏

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

    most impotent😂😂

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

    🔥🔥🔥