25 views

Consider a system with a 6 bit virtual address space, and 16 byte pages/frames. The mapping from virtual page numbers to physical frame numbers of a process is (0,8), (1,3), (2,11), and (3,1). Translate the following virtual addresses to physical addresses. Note that all addresses are in decimal. You may write your answer in decimal or binary.

(a) 20

(b) 40

Source:https://www.cse.iitb.ac.in/~mythili/os/ps/memory/ps-memory.pdf (Question-19)

| 25 views

+1 vote

Virtual Address Space is 6 bit.

16 byte pages/frames →  Page Size = 16 Byte. So Page Offset requires 4 bits.

Page Number bits = 6 – 4 = 2 bit → $2^2=4$ pages

From Given,

(a) 20 represented in Binary as 010100 from that First 2 bit is Page Number which is 01. If we see frame number mapped to 01 is 3 in Binary 11 and Page Offset is same as Frame Offset. So Physical Address is 11 0100 In Decimal it will be 52.