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

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

  1. 16 MB
  2. 8 MB
  3. 2 MB
  4. 24 MB
asked in Operating System by Veteran (68.8k points)
edited by | 4.5k views
how to solve this ques........

3 Answers

+32 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 (332k points)
selected by
Why page entry include frame bits only? Page table entry contains page no. And the corresponding frame no.

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

4 KB = 2^2 KB = 2^2 * 2^10 B = 2^2 * 2^10 * 2^3 bits
+8 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 Veteran (14.6k points)

how does 14 bits become 2 bytes? 

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

its is near by answer , & right also.
+5 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 Boss (8.4k points)
edited by
why f is 14 bits ?? shouldn't the page size and frame size are both equal ??  
shouldn't it be  12 bit(4 KB)

@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

32,330 questions
39,146 answers
108,247 comments
36,501 users