Questions tagged [page-replacement]

44 questions
0
votes
1 answer

A page replacement algorithm should minimize the number of page faults

I'm currently reading about Page Replacement Algorithms and I find complex question for me. Question is: Page replacement algorithm should minimize the number of page faults. Description: We can achieve this minimization by distributing heavily used…
yh264
  • 9
  • 3
0
votes
2 answers

Why LRU is better for replacement of file buffers in the buffer cache?

Can someone please explain why LRU is not considered practical for a page replacement algorithm, it is perfectly acceptable for replacement of file buffers in the buffer cache.
Sarah
  • 1
0
votes
2 answers

Proof for optimal page replacement (OPT)

I need prove that the optimal page replacement algorithm is indeed optimal, and I'm not sure exactly how to start. I thought maybe proof by contradiction, but once I formulated an alternative claim, I wasn't sure how to show that it would have equal…
Elijah Madden
  • 61
  • 2
  • 5
0
votes
1 answer

When will the LRU algorithm be miss 100%?

I know these two ways to make LRU algorithm miss 100%. Cyclic accesses to a data-set that is marginally larger than the cache size. Arbitrary bursts of accesses to an infrequently accessed data-set that pollutes the cache by replaceing the more…
Wonter
  • 293
  • 1
  • 5
  • 15
0
votes
2 answers

Are the LRU and FIFO page replacements done correctly here?

I am just only learning about paging and was wondering if what I did for my page replacements was correct as the tutorials I found online seem a bit all over the place. I am mostly seeking clarification on whether I've done anything wrong and would…
Kyle
  • 69
  • 6
0
votes
1 answer

Evaluate optimal replacement algorithm for 5 frames

Question: Consider the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6. How many page faults would occur for the optimal page replacement algorithms, assuming five frames? Remember all frames are initially…
CWHsu
  • 87
  • 7
0
votes
0 answers

Improve Second Chance Algorithm

Assume there are 3 frames in physical memory. Frame 1 has reference string 'a', Frame 2 has reference string 'b', Frame 3 has reference string 'c'. And their use bits are 1. And the next sequence victim is Frame 2. If the next reference string is…
user3032481
  • 548
  • 6
  • 18
0
votes
1 answer

How to calculate the number of pages used by a program, and the page numbers in the order in which they are referenced?

The goal of this project is to take a previously created program which calculates a cross product on a matrix of data, and test page replacement algorithms on it. The idea is to figure out how many pages are used by the program, and the order in…
freelancer05
  • 77
  • 2
  • 6
0
votes
1 answer

FIFO Page Replacement Algorithm - Counting Page Faults

I'm currently reading about Page Replacement Algorithms, and have been looking at a couple of examples with regards to the FIFO (First In, First Out) method. My question is as follows; how do you count the number of page faults, as I have seen…
yulai
  • 741
  • 3
  • 20
  • 36
0
votes
1 answer

Clock paging replacement algorithm

Clock replacement algorithm . arr - is physical memory arr2 - pages (virtual memory) if arr haven't page , then replace frame which have R=0 ; If all frames have R=1; Initialize all R=0; IF frame have page and R=1 . Do nothing . Else…
0
votes
0 answers

How to trace Memory References requested by Operating system?

i'm working on page replacement algorithm. for testing algorithm, i'm trying to analyse pattern in which OS would request Memory( Pages ). How should i trace these Memory request (Virtual) ?
bhushan23
  • 481
  • 1
  • 4
  • 13
0
votes
1 answer

How to code the optimal page replacement algorithm?

I am sharing my logic. I need to know if its fine. I created an array which stores the total number of occurrences for each page. For ex - If sequence of page requirements is { 1,2,3,1,2}. Lets call it "seq" array. Then array = { 2,2,1 } . Lets call…
user3080029
  • 553
  • 1
  • 8
  • 19
0
votes
4 answers

Entering infinite loop

This code is for the page replacement 'FIFO' algorithm. When I run the code it enters an infinite loop and doesn't end. I tried searching for it but I am unable to identify it. Code: #include int…
Siddhartha
  • 11
  • 5
-1
votes
2 answers

Calculating page faults with Least Recently Used

I am new to memory management and page replacement algorithms. I found and printed a question about the Least Recently Used algorithm, but unfortunately, I cannot determine if my answer and thought process are correct. I am trying very hard to…
SamSmith
  • 167
  • 1
  • 3
  • 13
1 2
3