The Gateway to Computer Science Excellence
+35 votes
A computer system implements $8$ $\text{kilobyte}$ pages and a $32-bit$ physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is $24$ $\text{megabytes}$, the length of the virtual address supported by the system is _______ bits.
in Operating System by Veteran (105k points)
edited by | 5.9k views
@shrestha @arjun

how to identify that it is page size not number of pages ?Like in question most of the time I am assuming 8kilobutes pages means no of pages not page size.please help

8KB means 213 Bytes, How can a number have a unit (like here its has Bytes). Had it been number of pages they would have written it as 8 Kilo pages (or something like this but without any unit). We can have 10 pages 20 pages but having 10 Bytes page indicate it is the size of page.

what is translation here. is it frame no. bits????

3 Answers

+54 votes
Best answer
$8$ $KB$ pages means $13$ offset bits.
For $32$ bit physical address, $32 - 13 = 19$ page frame bits must be there in each PTE (Page Table Entry).
We also have $1$ valid bit, $1$ dirty bit and $3$ permission bits.
So, total size of a PTE (Page Table Entry) $= 19 + 5 = 24$ bits $= 3$ bytes.

​Given in question, maximum page table size $= 24$ $MB$
Page table size $=$ No. of PTEs $\times$ size of an entry
So, no. of PTEs $= 24 MB / 3 B = 8 M$

Virtual address supported = No. of PTEs * Page size (As we need a PTE for each page and assuming single-level paging)
= $8 M $*$ 8 KB$
= $64 $GB$ $=  $2^{36}$ Bytes

So, length of virtual address supported = $36$ bits (assuming byte addressing)
by Veteran (425k points)
edited by
sir, we dont divide the page table size with the page size to get entries because of the extra bits involved? so that we wont get correct no of entries?
Page Table Size = #entries * Size of an entry

Why is page size relevant here?
sir i thought by dividing the page table size with page size/frame size  we get no of entries,my flaw in concept.
Yes....I got it...I was making mistake in bits and Bytes conversion...hence getting answer less by 3...thanks a lot :)
@resilent What is the logic for that division? Page table is something and page is something else. Why would one divind page table size by page size?

No. 36-13 = 23 bits are for indexing to page table. So, we have $2^{23}$ possible page table entries. Each of these entry is of 24 bits (19 for indexing and 5 for other purpose as in question). So, total page table size

$= 2^{23} \times 24\text{ bits}$

$ = 2^{23} \times 3 \text{ bytes}$

$ = 24 MB$
Why offset bit(13) has been subtracted from physical bit(32)?
Please help

total physical address bit=bits to point frames no + bits to point word inside  frame(offset bit)

@Arjun sir in the formula 

Virtual address supported = No. of PTEs * Page size (As we need a PTE for each page and assuming single-level paging)

does No. of PTE's also mean the number of pages??


@srestha ma'am

how we can say that  no. of pages means offset?

i think i am missing something

+17 votes
Ans 36 bits


Assume Virtual Address = x bits

entry size in page table = 19(frame bits)+5(permission bits) = 24 bits = 3 Bytes

2^(x-13)*3 = 24*2^(20)

solving we get x = 36 bits
by Boss (13.5k points)
0 votes
let 2^x pages in pg table
2^x * (frame size + book keeping)= 24MB
2^x * (19+5) = 2^20 * 24

virtual address = page no bits + offset = 23 +13 = 36

Ans : - 36
by (305 points)
edited by
2^x * (19+5) = 2^20 * 24

Related questions

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
50,645 questions
56,597 answers
102,134 users