I posted this in the C++ forum initially by accident and didn't realize it until just now.
I'm fairly certain I understand how page replacement works (and I did very well on all of this class' exams). I'm onto the programming project now and I am stuck at a bit I cannot figure out in order to start coding.
I have the following information:
Page sizes: 512, 1024, and 2048 (words)
Number of frames: 4, 8, 12
List of 3001 virtual memory addresses (there is an entire .DAT file, but here are just the first few): 12 ,5635, 1933, 8087, 5850, 4798
I can't seem to figure out how many pages there are for each of the page sizes.
I know this stuff is ridiculously easy. This brain fart just won't go away and the harder I think about it the more confused I seem to be getting.
2^(32-9)=2^23 ..which is the number of entries for a page size of 512. Is this the number of pages associated? Or would there be 16 pages? Or are both these wrong?
This is the assignment; however, I don't yet need help on anything but this as I've just started:
I'm fairly certain I understand how page replacement works (and I did very well on all of this class' exams). I'm onto the programming project now and I am stuck at a bit I cannot figure out in order to start coding.
I have the following information:
Page sizes: 512, 1024, and 2048 (words)
Number of frames: 4, 8, 12
List of 3001 virtual memory addresses (there is an entire .DAT file, but here are just the first few): 12 ,5635, 1933, 8087, 5850, 4798
I can't seem to figure out how many pages there are for each of the page sizes.
I know this stuff is ridiculously easy. This brain fart just won't go away and the harder I think about it the more confused I seem to be getting.
2^(32-9)=2^23 ..which is the number of entries for a page size of 512. Is this the number of pages associated? Or would there be 16 pages? Or are both these wrong?
This is the assignment; however, I don't yet need help on anything but this as I've just started:
Quote
Problem 2: Virtual Memory management problem
Compare the performance of the following page replacement algorithms: FIFO, LRU (Least recently used), MRU (most recently used), and optimal. You will be provided with a file containing the virtual addresses that are being referenced by a single program (a process). Run your program with the following parameters:
Page size: 512, 1024, 2048 (words)
Number of frames allocated to the process: 4, 8, 12
(So you will have 9 runs, with each page size and number of frames combination. Each run contains statistics for each of the four page replacement algorithms.
You must collect and print the following statistics
Page Size #of pages Page replacement ALG Page fault percentage
Your report must show a summary of runs and your conclusions.
Compare the performance of the following page replacement algorithms: FIFO, LRU (Least recently used), MRU (most recently used), and optimal. You will be provided with a file containing the virtual addresses that are being referenced by a single program (a process). Run your program with the following parameters:
Page size: 512, 1024, 2048 (words)
Number of frames allocated to the process: 4, 8, 12
(So you will have 9 runs, with each page size and number of frames combination. Each run contains statistics for each of the four page replacement algorithms.
You must collect and print the following statistics
Page Size #of pages Page replacement ALG Page fault percentage
Your report must show a summary of runs and your conclusions.