Questions tagged [page-replacement]
44 questions
1
vote
0 answers
How to run flashsim?
I recently came across papers based on Flash Aware Page replacement Algorithm. After going through a couple of them, I have created a new algorithm by modifying a few things within the previous algorithms. I now wish to test this algorithm against…

Lezwon Castellino
- 35
- 5
1
vote
2 answers
Could someone help me to figure an example of MRU and CLOCK?
As title.
There is a buffer pool with 3 pages that receives requests for the following page numbers:
2,4,4,2,5,2,1,1,3,1
The replacement policies are MRU and CLOCK.
I am confused about how they work. Could someone show me? Thanks a…

Echo0831
- 307
- 2
- 5
- 14
1
vote
1 answer
LIST_HEAD(clean_pages) is not working in Linux Kernel
I want to get a clean page list or inactive/active lists.
But when I used LIST_HEAD(clean_pages), LIST_HEAD(l_inactive) or LIST_HEAD(l_active), all the lists are empty..
In addition, LIST_HEAD(l_hold) is also empty..
Is there any way to get a clean…

nicelhc13
- 129
- 1
- 1
- 5
1
vote
1 answer
LRU Page Replacement algorithm C#
I am trying to write a function which simulates LRU page replacement. I understand LRU pretty well but am having problems coding it. The following things are being passed into the LRU function. The user specifies the 20 character reference string of…

user3015999
- 69
- 1
- 3
- 9
1
vote
1 answer
FIFO page replacement algorithm problems
I am writing a program to find page faults using FIFO in C#. The user either provides a 20 character reference string or a random one is generated. The user also inputs the number of frames.
So, I am passing in the array of 20 single digit numbers,…

user3015999
- 69
- 1
- 3
- 9
1
vote
2 answers
Using Ajax to Replace A Page Element Based on an Onclick Event
I'm reformulating this question as I'm understanding the issue better now.
I have an application with four models: Users, Products, Varieties and Seasons.
User
has_many :seasons
has_many :products, :through => :seasons
has_many :varieties,…

MikeH
- 866
- 1
- 14
- 26
0
votes
1 answer
A problem about virtual memory management in OS
Here is the context of this problem. I am confused that why I don't need to now how many entries in TLB?
For the first question:
when I access data in 0x2330, I find it in main memory since TLB is empty now, then I need 10 + 100 = 110(ns)
when I…

0130
- 15
- 7
0
votes
1 answer
What breaks a tie in Optimal Page Replacement?
Assume we have 3 frames for a process with values (1,7,0). Now assume that the remaining references in the string reference for that process are : 4,6,7. For the reference 4 , a page fault will occur and only 7 is present in the future , so which…

John adams
- 161
- 9
0
votes
1 answer
Redirect to a specific URL on page load JavaScript?
I have a problem with redirection. What I am trying to do is:
"When a specific page off one website is loaded, it should redirect to another page/URL in the same window".
I have this code
window.onload = function() {
location.href =…

Asaad Qamar
- 1
- 1
0
votes
0 answers
Segmentation fault while comparing elements in a dynamically allocated array
This program tries to simulate FIFO and LRU page replacement. I am trying to implement a simple queue using a dynamically allocated array for the FIFO queue. I want the "page" to be stored in the array.
#include
#include…

dxfghfvdcx
- 1
- 1
0
votes
0 answers
Least Recently Used vs Second Chance algorithm
Is it normal for Second Chance algorithm to have more page replacements than the least recently used algorithm supposing we had a counter for each algorithm??

ScatterBrainer
- 57
- 6
0
votes
0 answers
LRU page replacement vs FIFO page replacement
I was curious after conducting an experiment for a course. I have read in text that LRU was more efficient, but throughout all my testing that doesn't seem to be the case. Locality has a play with this correct? The file streams I used must have not…

Tbird DUNKIN
- 101
- 1
- 7
0
votes
0 answers
Why use the Accessed-Bit for the Least-Recently-Used algorithm?
In our lecture, the LRU algorithm for page replacement was explained by looking wether a page has been accessed in the last "epoch" (not sure if that's the proper english term). After every epoch, the A-Bit is set back to 0 on all pages. Lazy me…

AnonPJ
- 45
- 7
0
votes
1 answer
Remove and Insert into a LinkedHashMap using iterator?
I know its not possible to edit a HashMap or LinkedHashMap content during iteration without throwing a ConcurrentModificationException. However, I have a situation where I need to apply that. I am writing a virtual memory simulation using the Clock…

StevenMonty
- 56
- 2
- 6
0
votes
1 answer
How should modified pages be written out to secondary memory using Page Buffering?
I am studying for my final OS exam and am currently stuck in a question:
Assume a system uses demand paging as its fetch policy.
The resident size is 2 pages.
Replacement policy is Least Recently Used (LRU).
Initial free frame list: 10, 20. 30,…

Badger
- 7
- 3