in CO and Architecture retagged by
4,829 views
5 votes
5 votes


Consider the following memory organization of a processor. The virtual address is 40 bits, the physical address is 32 bits, the page size is 8 KB. The processor has a 4-way set associative 128-entry TLB i.e. each way has 32 sets. Each page table entry is 32 bits in size. The processor also has a 2-way set associative 32 KB L1 cache with line size of 64 bytes.
What is the total size of the page table?

  1.   8MB
  2.   10MB
  3.   2MB
in CO and Architecture retagged by
4.8k views

1 Answer

2 votes
2 votes
Physical address is 32 bits. So physical memory is $2^{32}$. Size of a page is 8 KB ($=2^{13}$ bytes). So number of pages $=\frac{2^{32}}{2^{13}}=2^{19}$. Each page table entry (PTE) is 32 bits (4 bytes). No. of PTE is equal to no. of pages because, for each page, a PTE must be there. Therefore, total size of page table must be No. of PTE * size of  PTE $=2^{19} * 2^2 = 2^{21} = 2$ MB.

4 Comments

here,why are we computing number of pages wr.t to physical memory??

virtual memory is divided into pages.right??not physical memory.

and generally in all the questions,we derive number of pages from virtual memory only,
1
1
Logical memory is divided into equal sized pages. Physical memory is divided into equal sized frames (size of a page and frame are equal).
0
0

but here we need to know the number of pages,not the frames.

here,it is asking the size of page table ,which is number of page table entries * size of each entry.

now,logical address is virtual address only as you said.

logical address is divided into pages.and here logical address is 40 bits long.

so number of pages shoud be 240/213 = 227

4
4

visakh r you have divided the Physical address space by page size ...is it not the concept of inverted page table...if we do so we will get number of frames....but here i think virtual address space is going to divide by page size because here asked about size of the page table, not size of inverted page table .

0
0

Related questions

2 votes
2 votes
1 answer
3