Knowee
Questions
Features
Study Tools

A system with 2-level page table, the frame size is 4KB; the address register is 32 bits, the row size of the page table is 4 bytes; the address register is divided into (p1, p2, offset) for fast address translation (no need to use multiplication and addition for calculating the physical address). Given a reference =4200746, the corresponding (p1, p2, offset) is?

Question

A system with 2-level page table, the frame size is 4KB; the address register is 32 bits, the row size of the page table is 4 bytes; the address register is divided into (p1, p2, offset) for fast address translation (no need to use multiplication and addition for calculating the physical address). Given a reference =4200746, the corresponding (p1, p2, offset) is?

🧐 Not the exact question you are looking for?Go ask a question

Solution

To solve this problem, we first need to understand the structure of the address in a two-level paging system. The 32-bit address is divided into three parts: p1, p2, and offset.

  1. Determine the size of the offset: The frame size is 4KB, so the offset is 12 bits (since 2^12 = 4096, which is 4KB).

  2. Determine the size of p1 and p2: The row size of the page table is 4 bytes, which means each entry can point to 2^12 = 4096 different pages. So, both p1 and p2 are 10 bits each (since 2^10 = 1024, which is close to 4096).

  3. Convert the reference to binary: The reference is 4200746. Convert this to binary, you get 100000000110001101010.

  4. Split the binary into (p1, p2, offset): From the right, take the first 12 bits as the offset, the next 10 bits as p2, and the remaining bits as p1. So, you get p1 = 100, p2 = 0000011000, offset = 0110101010.

  5. Convert back to decimal: Convert these binary numbers back to decimal to get the final answer. So, p1 = 4, p2 = 8, offset = 682.

So, the corresponding (p1, p2, offset) for the reference 4200746 is (4, 8, 682).

This problem has been solved

Similar Questions

Every address generated by the CPU is divided into two parts. They are ____________A.frame offset & page offsetB.page number & page offsetC.page offset & frame bitD.frame bit & page number

In which addressing mode is the effective address calculated by adding an offset to a base register value?*DirectIndexedRelativeRegister Indirect

Find the Target Address (TA) for the following machine instructions.      Indicate the values stored in A. Content of X =000090 B=006000 PC=003000i)032600h                           ii)003600

If the entry is 8 bytes long, each page table has 512 entries, and the Opteron has 4 KB pages. Each of the four level fields are 9 bits long, and the page offset is 12 bits, then the sign extended would be ans. 16 bits 128 bits 64 bits 32 bits

Consider a machine with a byte addressable main memory of 216 bytes and block size of 8bytes.Assume that a direct mapped cache consisting of 32 lines is used with this machine.• How is a 16-bit memory address divided into tag, line number, and byte number?• Into what line would bytes with each of the following addresses be stored?000100010001101111000011001101001101000000011101• Suppose the byte with address 0001101000011010 is stored in the cache. Whatare the addresses of the other bytes stored along with it?• How many total bytes of memory can be stored in the cache?

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.