Optimal Page Replacement Algorithm

Sdílet
Vložit
  • čas přidán 8. 09. 2024
  • Computer Science -Operating Systems OS
    Algorithm for paging when virtual memory management is required. The optimal page replacement algorithm is a best case scenario used to evaluate the efficiency of other page replacement algorithms.
    You might also want to check out:
    Banker's Algorithm explained • Banker's Algorithm exp...
    First-in First-out Page Replacement • (FIFO) First-in, First...

Komentáře • 15

  • @davidporterrealestate
    @davidporterrealestate Před 7 lety +51

    Thank god a native english speaker

    • @w0nnafight
      @w0nnafight Před rokem +1

      thats kind of racist dude

    • @divhead3521
      @divhead3521 Před rokem +6

      @@w0nnafight nah he just done with the other videos bc he couldnt understand anything

    • @luka4868
      @luka4868 Před rokem

      @@w0nnafight yeah he will learn all the languages in the world so he wont be a racist by your dumb standards

    • @ercudu
      @ercudu Před 8 měsíci

      Bruhh are u for real ???

    • @acethemain7776
      @acethemain7776 Před 6 měsíci

      @@w0nnafightheck yeah

  • @hello_world_0
    @hello_world_0 Před 7 lety +2

    Hey, great vidoes! One question though. What would have happened if the last 2 numbers were not hits but page faults? What should we have replaced, considering we can't look onto the future - cause the stream has ended. Thanks in advance.

    • @ComputerScienceExplained
      @ComputerScienceExplained  Před 7 lety +2

      arxatheshark great question, so the number before the last would look at the last number for a hint. the last one you can replace with any position since there is nothing after.

    • @hello_world_0
      @hello_world_0 Před 7 lety +1

      Thanks for your answer, I got what you said! However, take a look at this picture: s28.postimg.org/4ucdnpogd/OPT_example.jpg
      When number 2 (in red circle) tries to get inside the memory, it replaces number 4. I was wondering why is that. We have 3 candidates (4, 3, 5) to be replaced by number 2. We can see that 5 is right afterwards, so we are left with (4, 3). At this point we don't have any future data, so:
      A) Do you think that the example chooses a number between (4, 3) randomly to replace?
      B) Or, (which I suspect is the case) the example looks right back from the start, like a circle, to determine whats the most far away number between those two (this scenario actually fits, in this example) ?
      Thanks in advance, keep doing your great work!!

    • @ComputerScienceExplained
      @ComputerScienceExplained  Před 7 lety +1

      I honestly believe that to be coincidental.

  • @da7ma758
    @da7ma758 Před 3 měsíci

    ba7bk ya fanaaaaaaaaaaan ye5rebetak hamoooooott mn gamal 4ar7ak ye5rebet omak wla agda3ha doctooooor