-1
$\begingroup$

In a 64 bit computer, the logical address space is 64MB and physical memory size is 2GB. Paging is implemented with 4KB pages. Determine the logical and physical address components. (That is, how many bits are there in p, f and d in logical addresses <p, d> and in physical addresses <f, d>?)

I found p = 14bit and f = 19 bit. But i cant find d. Answer d = 9bit

Please let me know if you can help in this matter.

$\endgroup$
3
  • $\begingroup$ The question is not very clear. This is not common terminology and why is the logical address space 64MB? Logical address space is normally the size of the physical memory because you can have a process up to the size of physical memory. Normally d would be the offset in a page so it would be 12. But why is it supposed to be 9? Also, a physical address doesn't have 2 components. A physical address is a physical address. It has one component which is the physical address itself. $\endgroup$
    – user123
    Apr 9 at 16:25
  • $\begingroup$ I think your teacher needs to learn more about paging. $\endgroup$
    – user123
    Apr 9 at 16:26
  • $\begingroup$ (Without any indication how to interpret $p$, $f$ and $d$, let me assume page, frame and displacement (offset isn't unheard of) (please edit the intended interpretation into your post).) For a 64 bit processor, 64 megabytes is unlikely - that's about the size of 2024 "on-chip" caches. While there have been machines with physical memory exceeding logical address space, that's usual at the end of an ISA's life cycle - don't hold your breath for 64 bit ones. Memory access doesn't need to be in processor word sized chunks, OTOH, 9 is the number of bits needed to identify one such in 4KB. $\endgroup$
    – greybeard
    Apr 10 at 1:28
0
$\begingroup$

In logical paging we have offset and page number. In physical we have frame number and offset . so offset doesn't changed. From given information of the problem our logical address has following presentation, because the ration of $\frac{64MB}{4KB}=\frac{2^{26}}{2^{12}}=2^{14}$. the bits we need for page numbers are $14$ bits, And remaining bits assigned to offset because our offset need $12bits$, because it size is $4KB$. enter image description here

For Physical address you can use above method, but remember that our offset in physical and logical address remain without change. So as a result we have : enter image description here

$\endgroup$
1
  • $\begingroup$ Really thanks for help but you couldnt find d either :( $\endgroup$
    – Pinky
    Apr 11 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.