There is a logical address space of 8 pages, and each page is 2KB.
The physical address space has 4 frames (size of a frame equals the size of a page).
I am given a sketch where there is an arrow from page number 0 to frame 1 that indicate a mapping between page 0 to frame 1.
I need to find the physical address of the logical address 2500.
I would like to know if my solution is correct.
This is my solution: Because a size of a page is 2KB, that means that we need 14 bits for the offset. (cause 2KB=2^14) And there are 8 pages (0 to 7) so we need 3 bits for the page number.
So the given virtual address in binary is:
000 00100111000100 =2500
first 3 bits from left - 000 - indicates page number 0
the rest of the bits - 00100111000100 - indicates the offset 2500
page 0 ----->frame 1 (mapping in the sketch)
So my physical address will be: 0100100111000100 = 18884.
first 2 bits -indicate the frame number- 01.
rest of the bits - indicates the offset - 00100111000100.
(there are 4 frames and therefor we need 2 bits for frame number).
I ll appreciate a response.
Thanks,
Shiran