Can anybody help me on the construction of simple virtual memory system using C code. I would appreciate any comments, references, hints, any C material related to this topic, guides, etc
Grateful for your kind attention
Luís Dimas
Can anybody help me on the construction of simple virtual memory system using C code. I would appreciate any comments, references, hints, any C material related to this topic, guides, etc
Grateful for your kind attention
Luís Dimas
Make functions to send and fetch data from your "virtual memory". Basicly, file read and write functions. Make a function to check to see if the needed value is in memory. Make a function to do your comparison values. Vola. Virtual memory.
An easy implementation is a double linked list. Make your list store X items. If there are more than X, page them to disk. If the value you're trying to find is not in memory, scan the disk for it. If it is, save one of the items in memory to disk, and load the item you need.
Slightly improved upon this is a weighted list. The more common you request a particular piece of data, make it higher in the list so that it doesn't get swapped out as often.
Quzah.
Hope is the first step on the road to disappointment.