# GATE2015-2-47

7.5k views
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.

edited
2
@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
5

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.

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

$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)

edited by
0
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?
0
Page Table Size = #entries * Size of an entry

Why is page size relevant here?
0
sir i thought by dividing the page table size with page size/frame size  we get no of entries,my flaw in concept.
0
Yes....I got it...I was making mistake in bits and Bytes conversion...hence getting answer less by 3...thanks a lot :)
1
@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?
3
@Hrishikesh

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$
0
Why offset bit(13) has been subtracted from physical bit(32)?
1
@abhishek

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

@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??

0

@srestha ma'am

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

i think i am missing something

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
let 2^x pages in pg table
2^x * (frame size + book keeping)= 24MB
2^x * (19+5) = 2^20 * 24
x=23

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

Ans : - 36

edited
0
2^x * (19+5) = 2^20 * 24
x=23
explain

## Related questions

1
7.6k views
A computer system implements a $40-bit$ virtual address, page size of $8$ $\text{kilobytes}$, and a $128-entry$ translation look-aside buffer ($TLB$) organized into $32$ sets each having $4$ ways. Assume that the $TLB$ tag does not store any process id. The minimum length of the $TLB$ tag in bits is ____.
Consider a typical disk that rotates at $15000$ rotations per minute (RPM) and has a transfer rate of $50 \times 10^6$ bytes/sec. If the average seek time of the disk is twice the average rotational delay and the controller's transfer time is $10$ times the disk transfer time, the average time (in milliseconds) to read or write a $512$-byte sector of the disk is _____
Let $X$ and $Y$ denote the sets containing 2 and 20 distinct objects respectively and $F$ denote the set of all possible functions defined from $X$ to $Y$. Let $f$ be randomly chosen from $F$. The probability of $f$ being one-to-one is ______.
The number of states in the minimal deterministic finite automaton corresponding to the regular expression $(0+1)^* (10)$ is _____.