Struct definition as the page table entry and the array


Use the following struct definition as the page table entry and the array that follows it as the page table. Implement the software simulation of least recently used algorithm in two C++ functions. Should RUN on UNIX.

The first one will implement the aging and will be called at every clock interrupt. The second one will return the index in the page table of the entry to be replaced using this algorithm.

//Testing file will be provided.

//Should be well commented.....

----------------------------------

typedef struct

{
word pageFrameLocation; /*called page frame number

byte recentlyUsedBits; /* this is the field you will use for aging*/

byte flags; /* see format of flags below*/

}

PageTableEntry;

PageTableEntry page_table[1024]; /* this is the global variable for the page table*/

/* the page table entries flags field has the following format, the high order bit (You can find if it is set by doing a bitwise and with the flags member and 0b10000000) is the referenced bit. The next highest order bit is the Modified bit. The next three bits are the protection bits (in order rwx [read/write/execute]) The next bit is the present/absent bit, the next bit is the caching disabled bit *

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Struct definition as the page table entry and the array
Reference No:- TGS0772465

Expected delivery within 24 Hours