in Operating System
22,546 views
8 votes
8 votes

If the page size in a 32-bit machine is 4K bytes then the size of page table is

  1. 1 M bytes
  2. 2 M bytes
  3. 4 M bytes
  4. 4 K bytes
in Operating System
22.5k views

4 Answers

15 votes
15 votes
Best answer

Here Logical address (LA)=32bit

and  Physical address (PA)=32bit

Page size=4KB

Page table size =Number of entries in page table *page table entry size

                        =$\frac{2^{32}}{2^{12}}\times$(page table contain frame number+additional bit(valid/invalid,protection bit etc.))

                       =$2^{20}\times 20\ bit$

                       =4 MB(apx).

So C is correct ans .

selected by

14 Comments

how physical address is 32 bit
3
3
@asu In 32 bit system addressing limit is 32 bit that's why i have taken PA=32?isn't it?
1
1
32 bit is corresponding to VM rt?
0
0
yes @arjun sir In  32-bit architecture is limited to addressing a maximum of 4 gigabytes of memory.

So i am assuming Virtual  address (LA)=32bit and  Physical address (PA)=32bit.

Because only info is given in qus is 32 bit machine.
0
0
okay, but it is more than 2M rt -2.5MB? So, why pick 2M and not 4M? Because we also need other bits for protection, page replacement etc.
2
2
yes that,s correct .Means we can extend physical address to store other info in 32 bit system ?
0
0
No. I mean to address $2^{20}$ possible page frames, we need $20$ bits. So, each page table entry must be at least 20 bits. (it can be any length larger, but not short). Now, 1-2 protection bits LRU bits are also required. So, around 24 bits are required per page table entry.
6
6
Ok thanks sir.
0
0
but no option with 3MB, so we can consider upper limit like 4MB ,
is it correct @Manoj?
0
0
correct.Already explained.
0
0
reshown by

How does 212  came ?? N i am not getting​ 220 * 20bit = 4MB ,can u plz explain in brief(calculation)..

0
0
@Pooja
Page size = 4KB = 2^2 x 2^10 Bytes (1KB = 2^10 Bytes)
And page table size approx 3 MB but no option is there so we will take upper limit , 4MB
0
0
pease at least edit and correct the answer to 3MB
0
0
Where did u get the frame number + additional bit as 20 from?
0
0
2 votes
2 votes

Page table for 32-bit address space with 4K byte pages has 232 / 212 = 220 entries. If each entry is 32 bits, need 4M bytes of memory to store page table.Correct answer is 4M bytes.Page table for 32-bit address space with 4K byte pages has 232 / 212 = 220 entries.

If each entry is 32 bits, need 4M bytes of memory to store page table.

1 comment

"Each entry is 32 bits"

How did you take this?
0
0
1 vote
1 vote
the answer is 4M bytes.

let p  bits represent page number and d represent offset.

page size=2^d=4k=4*2^10; 2^d=2^12 therefore d=12;

p+d=32; p=20;

size of page table=max number of pages*size of each entry=2^p*4=2^20*4=4M
by
–3 votes
–3 votes

Option D, is correct answer.

In a Paging Concept, by default we take single level Paging,

IN A SINGLE LEVEL PAGING

Page Size = Frame Size = Page Table Size

because, page table will also load in main memory into one of the frame.

so, here

Page Size = Page Table Size = 4 K bytes

3 Comments

who taught you this rule for single level paging?
1
1

Sir, it is quite logical.

we know that, page size = frame size ( we divide the memory into no of frames in such a way that every frame can hold 1 page of the process.)

A/c to above answer everyone saying, correct answer is option c. (i.e page table size = 4 MB and also given that frame size = page size = 4KB, and we also know that page table also load in main memory into one of the frame to say that which page of process loaded in which frame of the main memory. so, how page table of size 4MB will load into 4kB of frame size. i.e option a,b,c are wrong option ( a/c to me).

now, think about my above conclusion

page size = frame size = page table size ( single level paging)

here i mistake something, actually in single level paging,

page table size ≤ page size = frame size.

Please correct me if i am wrong.

0
0
We can not assume page table size to be equal or less than frame/page size.
0
0
Answer:

Related questions