0
$\begingroup$

I'm working on the following exercise and can't get the calculations right:

Assume an OS uses:

  • 33 bits for physical address
  • 34 bits for logical address
  • 2KB frame size

Calculate:

  • How many bits are used for the offset
  • How many bits are used to identify a frame
  • How many bits are used to identify a page

And then: Assuming the page tables include the valid and dirty(edit) bit, calculate the size (in bits) of a process' page table using all pages.

I have a hard time understanding this type of calculation and will greatly appreciate any help.

$\endgroup$

1 Answer 1

1
$\begingroup$

The frame size is 2KB. Assuming memory is byte-addressable, we need an offset into 2000 different bytes. 2000 is approximately (2^10)*2 = 2^11, so we need 11 bits for the frame offset.

Then, we can easily calculate that 33 - 11 = 22 bits are used to identify a physical page (frame), and 34 - 11 = 23 bits are needed to identify a virtual page.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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