I'm working on the following exercise and can't get the calculations right:Assume an OS uses:33 bits for physical address34 bits for logical address2KB frame sizeCalculate:How many bits are used for the offset How many bits are used to identify a frameHow many bits are used to identify a pageAnd 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.
How many bits for offset/frame/page
operating systems;virtual memory
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.