The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+17 votes
6.1k views

Consider a machine with $64$ MB physical memory and a $32$-bit virtual address space. If the page size s $4$ KB, what is the approximate size of the page table?

  1. $\text{16 MB}$
  2. $\text{8 MB}$
  3. $\text{2 MB}$
  4. $\text{24 MB}$
asked in Operating System by Veteran (59.4k points)
edited ago by | 6.1k views
0
how to solve this ques........

3 Answers

+34 votes
Best answer

Number of pages = 232 / 4KB = 220 as we need to map every possible virtual address.

So, we need 220 entries in the page table. Physical memory being 64 MB, a physical address must be 26 bits and a page (of size 4KB) address  needs 26-12 = 14 address bits. So, each page table entry must be at least 14 bits.

So, total size of page table = 220 * 14 bits ≈ 2 MB (assuming PTE is 2 bytes) 

answered by Veteran (348k points)
selected by
0
Why page entry include frame bits only? Page table entry contains page no. And the corresponding frame no.
+1

Page in physical memory is page frame. And PTE (in last level page table) needs to identify frame only.

http://stackoverflow.com/questions/11783981/is-number-of-frame-number-of-pageslinux

0
4 KB = 2^2 KB = 2^2 * 2^10 B = 2^2 * 2^10 * 2^3 bits
+9 votes

Physical memory =64MB=226 B 

Size of frame =4KB =212B

No. of frames =  physical memory/size of frame = 226/212 =214

No.of bits for frame =14 bits

Virtual memory =32 bit =232

Size of page =size of frame =4KB =212B

No. of pages =virtual memory/size of page =232 /212 =220 B

Page table enteries=No.of pages =220 B

size of page table entry =Page table enteries *No.of bits for frame

                                   = 220 *14bits =220 * 2bytes =2 *220 B =2MB

answered by Boss (14.1k points)
0

how does 14 bits become 2 bytes? 

220 *14bits =220 * 2bytes =2 *220 B =2MB

0
its is near by answer , & right also.
+6 votes
ans is C.

here page size is 4KB, which is 2^12 (12bits)

given is physical memory 64MB. therefore in bits f+d = f+12 bits

VAS is 32 bits therefore p+d=p+12 bits => p+12=32 => p=20

page table size = num of page table entries * size of each entry

here entry size is not given so we can directly take size of " f " in bits as entry size, which is 14 bit approx 2 bytes
no of pages = 2^32 / 4KB = 2^20
page table size = 2^20 * 2 bytes = 2MB
answered by Loyal (8.3k points)
edited by
0
why f is 14 bits ?? shouldn't the page size and frame size are both equal ??  
shouldn't it be  12 bit(4 KB)
+1

@Anjali :

Page size and frame size is same.

f here represents number of bits required to locate a single frame in the physical memory not the frame size.



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

36,171 questions
43,624 answers
124,024 comments
42,893 users