408 views
1 votes
1 votes


I was watching this video lecture suggested by GO videos playlist and can't get my head around the Page Table Entry(PTE) computation
According to the video @ 3:46 the author points a question saying "How many PTEs do we need in the Page Table
->Virtual Address Space : 2^32
-> 32 bit machine => word size:32 bits->4bytes
->Each page is 4KB

My thoughts on PTEs are 
4KB means 1K*4B=1K Words=2^10 Words
PTE= 2^32/2^10 = 2^22=4 Million
But the instructor says it's 1 Million
Please let me know where im i going wrong
Thanks

 

1 Answer

Best answer
3 votes
3 votes

Number of entries in the page table is same as number of pages in the LAS. Except for inverted page tables, it is the number of frames in PAS.

Here number of pages = $\frac{VAS}{page size}$ = $\frac{2^{32}B}{4 KB}$ = $\frac{2^{32}}{2^{12}}$ = $2^{20}$ which is 1 million

You should not convert bytes to words as default is byte addressable. Also word size is not always 32 bits, it varies as per the processor architecture. It will be explicitly mentioned if you have to do the conversion of bytes to words or not.

Hope this helps!

selected by

Related questions

2 votes
2 votes
0 answers
2
2 votes
2 votes
1 answer
3
3lurryface asked Jan 9, 2019
1,103 views
If there is 2 or more level paging for processes, is it possible to have more than 1 page fault while accessing any single addressable unit(byte or word) ?