Hey there,
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:
Page sizes: 512, 1024, and 2048 (words)
Number of frames: 4, 8, 12
List of 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. Are there simply 16, 32, and 64 pages respectively for each page size? I've been able to figure out the number of pages, frames, and number of virtual address spaces with many other problems and variables (both for homework and tests) but for some reason my mind has put up a block against this one. I feel it has something to do with how the information has been presented to me (as it's different than it has been before).
So yea, if anyone could help me figure out the number of pages I can get this thing started on paper and hopefully have it coded before the evening is over.
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. It may very well be attributed to the fact that I quit smoke a few days ago. My head is so fuzzy!
2^(32-9)=2^23 ..which is the number of entries for a page size of 512.
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:
Page sizes: 512, 1024, and 2048 (words)
Number of frames: 4, 8, 12
List of 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. Are there simply 16, 32, and 64 pages respectively for each page size? I've been able to figure out the number of pages, frames, and number of virtual address spaces with many other problems and variables (both for homework and tests) but for some reason my mind has put up a block against this one. I feel it has something to do with how the information has been presented to me (as it's different than it has been before).
So yea, if anyone could help me figure out the number of pages I can get this thing started on paper and hopefully have it coded before the evening is over.
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. It may very well be attributed to the fact that I quit smoke a few days ago. My head is so fuzzy!
2^(32-9)=2^23 ..which is the number of entries for a page size of 512.
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.