4,244 views
3 votes
3 votes
A computer system implements a 36 bit virtual address. Page size is 4KB and size of physical memory is 30 bits. The approximate size of page table in the system is ___ MB ?

Is it 36MB or 48MB ?

3 Answers

Best answer
9 votes
9 votes

There is a issue of byte - allignment or word allignment associated the given question which is : 

If  a word (page table entry in this context) of a memory segment which is a page table is not a multiple of 8 in case the memory is byte addressable , then the word size is rounded to next higher byte (if it is byte addressable) for proper access of page table entries . Else what will happen is same memory address will be shared between two page table entries which is not correct. Hence there is a need of byte allignment .

Hence here page table size  =  Number of page table entries *  Page table entry size

                                         =  (Logical address space / Page size)  * Page table entry size

Page table entry size          =  log2 (Number of frames)

                                         =  log2 (Physical address space / Page size)

                                         =  log2 (230 / 212)

                                         =  18 bits

But it is not a multiple of  8 , hence rounded to next higher multiple of 8 which is  =  24 bits  =  3 B

Hence page table size        =   (236 / 212) * 3 B

                                        =   224  *  3 B

           Page table size      =   48 MB

selected by
0 votes
0 votes
Given,

LA= 36 bits, MM= 30 bits, Page size= 4kB.

Now, number of bytes in a page= Page size/ Byte size = 4kB/1B = 4k(Since,byte addressable).

Thus number of bits required to represent an offset = log(4k) = log(2^2 × 2^10) = 12 bits.

Hence, number of bits for Frame = 30-12=18 bits ~ 3B( 1B=8 bits)

Number of bits for Page = 36-12 =14 bits.

Thus,number of entries in the page table = 2^24 = 2^20 × 2^4 = 16M entries.

Therefore, size of the page table = 16M × 3B = 48MB.

Related questions

0 votes
0 votes
1 answer
1
Mrityudoot asked Mar 20
147 views
If Page size = Frame size is always true and offset in Logical address = offset in physical address holdsThen how/why Logical address size can come different than physica...
0 votes
0 votes
1 answer
2
0 votes
0 votes
2 answers
3
Unique_999 asked Aug 17, 2023
320 views
Can Any explain the relationship between The “ Word Size “ and “ Logical Address Space “