search
Log In
0 votes
46 views
A computer has $32-bit$ virtual addresses and $4-KB$ pages. The program and data together fit in the lowest page $(0–4095)$ The stack fits in the highest page. How many entries are needed in the page table if traditional (one-level) paging is used? How many page table entries are needed for two-level paging, with $10$ bits in each part?
in Operating System 46 views

1 Answer

0 votes

The program and data toget­her fit in the lowest page (0-4095) The stack fits in the highest page.

means they will only occupy one frame since frame size is 4KB.so one entry is for this page in first level

and stack occupy highest page so one more entry for stack,as only required pages are brought in memory.

so total 2 entries in first level page table

So, while the total number of page table entries is 1048576, of those you only use 2 entries, one for each of those 2 pages (entry 0 points at the code/data page and entry 1048575 points at the stack page)

but for two level paging there will be 2 more entries for two first level pages i mentioned above

for more detailed https://stackoverflow.com/questions/12485737/oper-systems-and-memory-management-theoretical


edited by

Related questions

1 vote
4 answers
1
0 votes
0 answers
2
28 views
Section $3.3.4$ states that the Pentium Pro extended each entry in the page table hierarchy to $64$ bits but still could only address only $4\: GB$ of memory. Explain how this statement can be true when page table entries have $64$ bits.
asked Oct 26, 2019 in Operating System Lakshman Patel RJIT 28 views
0 votes
0 answers
3
35 views
Suppose that a machine has $438-bit$ virtual addresses and $32-bit$ physical addresses. What is the main advantage of a multilevel page table over a single-level one? With a two-level page table, $16-KB$ pages, and $4-byte$ entries, how many bits should be allocated for the top-level page table field and how many for the next level page table field? Explain.
asked Oct 26, 2019 in Operating System Lakshman Patel RJIT 35 views
1 vote
1 answer
4
38 views
Suppose that a machine has $48-bit$ virtual addresses and $32-bit$ physical addresses. If pages are $4\: KB$, how many entries are in the page table if it has only a single level? Explain. Suppose this same system has a $TLB$ (Translation Lookaside Buffer ... and it sequentially reads long integer elements from an array that spans thousands of pages. How effective will the $TLB$ be for this case?
asked Oct 26, 2019 in Operating System Lakshman Patel RJIT 38 views
...