Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following page table is for a system with 16-bit virtual and physical addres

ID: 3553850 • Letter: T

Question

The following page table is for a system with 16-bit virtual and physical addresses and with 4,096-

byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread

zeroes out all values of the reference bit. A dash for a page frame indicates the page is not in memory.

The page-replacement algorithm is localized LRU, and all numbers are provided in decimal.

a. Convert the following virtual addresses (in hexadecimal) to the equivalent physical addresses.

You may provide answers in either hexadecimal or decimal. Also set the reference bit for the

appropriate entry in the page table.

0xE12C

0x3A9D

0xA9D9

0x7001

0xACA1


b. Using the above addresses as a guide, provide an example of a logical address (in hexadecimal)

that results in a page fault.


c. From what set of page frames will the LRU page-replacement algorithm choose in resolving a

page fault? (assume you have set the reference bit for sub-question a.)

Page Page Frame 2 14 3 10 13 7 15 11 4 13 Reference Bit

Explanation / Answer

a) Converting the virtual addresses (in hexadecimal) to the equivalent physical addresses:

Number of bits in Logical Address = 16bits

Page size = 4096 bytes

                =2^12 bytes

Logical address consists of page number and page offset.

Number of bits used in page offset = Log2 (Page size).

                                               = Log2 212

                                              = 12 bits.

The physical address can be calculated as follows:

The given virtual address is 0xE12C

The binary form of the virtual address is 1110 0001 0010 1100.

Here, page number is E(1110) and offset is 12C(0001 0010 1100).

Therefore, the physical address is 312C.

The given virtual address is 0x3A9D

The binary form of the virtual address is 0011 1010 1001 1101

Here, page number is 3(0011) and offset is A9D(1010 1001 1101).

Therefore, the physical address is AA9D.

The given virtual address is 0xA9D9

The binary form of the virtual address is 1010 1001 1101 1001

Here, page number is A(1010) and offset is 9D9(1001 1101 1001).

Therefore, the physical address is 59D9.

The given virtual address is 0x7001.

The binary form of the virtual address is 0111 0000 0000 0001

Here, page number is 7(0111) and offset is 001(0000 0000 0001)

Therefore, the physical address is F001.

The given virtual address is 0xACA1

The binary form of the virtual address is 1010 1100 1010 0001

Here, page number is A(1010) and offset is CA1( 1100 1010 0001).

Therefore, the physical address is 5CA1