in Operating System edited by
18,946 views
66 votes
66 votes
A computer system implements $8\;\text{kilobyte}$ pages and a $32\text{-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 edited by
18.9k views

4 Comments

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

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.

10
10
what is translation here. is it frame no. bits????
2
2
8KB pages mean size of each page is 8KB
0
0

4 Answers

96 votes
96 votes
Best answer
$8\;\textsf{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\;\textsf{MB}$

Page table size $=$ No. of PTEs $\times$ size of an entry

So, no. of PTEs $= 24\;\textsf{ MB} / 3\;\textsf{B} = 8\;\textsf{M}$

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

$= 8\;\textsf{M} \ast 8\;\textsf{KB}$

$= 64\;\textsf{GB} = 2^{36}$ Bytes

So, length of virtual address supported $= 36$ bits (assuming byte addressing)
edited by
by

4 Comments

What would be the difference if we assume word addressing ? just curious.
0
0

Hi All,  In this question what is mean by translation . Is it the frame numbers bits?

Please confirm 

2
2

@Nandhakumar Yes bro. 

1
1
19 votes
19 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
1 vote
1 vote
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 by

1 comment

2^x * (19+5) = 2^20 * 24
x=23
explain
0
0
0 votes
0 votes
we know page size in virtual address is equal to page size in physical address
 

so , 32bit physical address where each page is 8kb (2^13) so no.of frames in physical address is 2^32 / 2 ^13 = 2^19.

19 bits in page table entry and 1 valid bit , 1 dirty bit , 3 permission bits total 24 bits in page table entry

page table size is 24mb and each page table entry has 24 bits means 3 bytes
now Number of entries in page table = size of table/ size of each entry

24mb / 3 bytes = 800000 entries in page table

8000000 can be represented by 23bits
page number is 23 bits and page size is 8kb (2 ^ 13)

we know if a size of virtual address is 2^m has a page of size 2^n
then m-n bits of logical address represent page number and n bits offset

if m-n = 23

n = 13

m = 23 + 13

m = 36 bits of virtual address
Answer:

Related questions