Awesome q2a theme
0 votes

In a two level paging environment a page table is divided into $2^{12}$ pages each of size $4 KW$. The memory is word addressable, The physical address space is $128 MW$. Memory is divided into $2^{14}$ frames. The size of inner page table is __________

My solution is, since outer page table has $2^{12}$ pages and each page of size $4KW$ i.e. $2^{12}W$ so inner page table size is $2^{12} *2^{12}W=2^{24}W$

Is this correct?

And what if it was asked What is the size of the logical address space?

My approach is since the outer page table contains $2^{12}$ entries so we have to do $2^{12} * number$ $of$ $pages$ in the each inner page table $* Page size$

But how to find number of pages in the inner page table ?

in Operating System by (699 points) | 30 views
Also, I went through that link with the question and saw this statement from someone who posted the answer :
Page table 2: Number of bits required to represent page size of page table or  word number of page of page table . which is 4KW = 2^12 Words. = 12 bits

This is a very scary concept to pick up. Please be careful.

We can represent each word with the help of $12bits$ right?

Why scary then?
Because number of bits required to ADDRESS a page table in the LAS depends on the number of entries it has - not it's size in words or bytes.

Else to address into a page table with 20MB size and just 16 entries (say) - you'll need $2^{21}$ bits instead of just 4 bits.

Got it.. so it is the $entries$ in the page table that is our main concern rather than the $words/bytes$
Exactly. If you have a page table of 100B (or words) size - you won't need log(100) bits to address into it, would you ?  You would need log(100)-x bits to address into the page table, and x bits to address into the byte (or word), where is x is the frame offset.

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users 2020 Aug 10 - 16
  1. Arkaprava

    404 Points

  2. jayeshasawa001

    198 Points

  3. SarathBaswa

    126 Points

  4. Ashutosh777

    67 Points

  5. toxicdesire

    20 Points

  6. Nilabja Sarkar

    12 Points

  7. premu

    10 Points

  8. iarnav

    7 Points

  9. Jhumpa_Sarma

    6 Points

  10. Patel0967

    6 Points

Weekly Top User (excluding moderators) will get free access to GATE Overflow Test Series for GATE 2021
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Top Users Aug 2020
  1. Arkaprava

    404 Points

  2. jayeshasawa001

    203 Points

  3. Mellophi

    156 Points

  4. Ashutosh777

    143 Points

  5. SarathBaswa

    126 Points

  6. anurag sharma

    49 Points

  7. toxicdesire

    20 Points

  8. shashankrustagi2021

    16 Points

  9. premu

    16 Points

  10. Kushagra गुप्ता

    15 Points

7,769 questions
1,977 answers
95,111 users