The question given is wrong,
The question should be 36 bits in the virtual address and 32 bits in the Physical address and if this was the condition then option B (24,24,24 )is right.
WHY THIS QUESTION IS WRONG???
if you do according to the right procedure you will find that the way they have allocated the bits in the Logical address for page table indexing is wrong :
Allow me to clarify it:
let us say 1st level means outermost page table. and 3rd level means innermost page table.
and we know that page size= frame size = 4kb= 12 bits in page offset or frame offset field
Since virtual address space is 32 bits then
no of pages= (2 ^ 32 ) / page size = (2 ^ 32) / 4 kB = (2 ^ 20) = 2 M
for the innermost level or says at 3rd level: page table size =
(2^ 20 ) * 4 BYTE = 4 MB which is greater than page size and it can't fit in one frame so we have to again do paging. // 4 B is page table entry size they have given it.
for the second level
No of page table entry = 4 MB / 4 KB = 1 K pages and size of the page table for the second level is 1k *4B= 4 KB which is equal to page size, it means now we don't need any other LEVEL. Two level paging is enough for this question
to allocate bits, divide the virtual memory as
Total bits = 32
for innermost we need 10 bits because it is completely filed and for outermost page table we need 10 bits and for page offset, we need 12 bits.
1.NEVER divide physical address into pages, it can be divided only in two field Frame no and frame offset
2.Don't attempt any wrong question in gate they are going to give marks to everyone who is not attempted.