edited by
32,582 views
102 102 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.

7 Answers

Best answer
142 142 votes
$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
26 26 votes

The page size is \( 8~\text{KB} = 2^{13} \) bytes.
Hence, the offset part of the address requires 13 bits.

The total physical address size is \( 32~\text{bits} \).

Therefore: \( \text{Frame number bits} = 32 - 13 = 19 \)

19
13
Frame
Number
Page
Offset

Physical Address = 32 bits


Assume Page number = p bits.
Hence, total number of pages = \( 2^p \).

If the number of entries in the page table equals the number of pages,

\( \text{Number of pages} = \text{Number of entries in page table} = 2^p \)

We can find \( p \) using the given page table size.

p
13
Page
Number
Page
Offset

Virtual Address = (p + 13) bits


Each Page Table Entry (PTE) consists of the following fields:

\[ \text{PTE size} = \underbrace{19}_{\text{Frame no. bits}} + \underbrace{1}_{\text{Valid bit}} + \underbrace{1}_{\text{Dirty bit}} + \underbrace{3}_{\text{Permission bits}} = 24~\text{bits} = 3~\text{bytes} \]

Maximum page table size = \( 24~\text{MB} = 24 \times 2^{20} \) bytes

Number of Page Table Entries = \( \dfrac{24 \times 2^{20}}{3} = 2^{23} \Rightarrow p = 23 \)


Total Virtual Address bits = \( 23 + 13 = 36 \).

Thus, the system supports a 36-bit virtual address space.

23
13
Page
Number
Page
Offset

Total = 36 bits

edited by
24 24 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
5 5 votes

 THe Easiest way

edited by
1 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 1 vote
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:
Position:
Show:

Related questions

74 74 votes
9 answers 9 answers
34.4k
34.4k views
go_editor asked Feb 12, 2015
34,433 views
A computer system implements a $40\;\text{-bit}$ virtual address, page size of $8\;\text{kilobytes}$, and a $128\text{-entry}$ translation look-aside buffer $\text{(TLB)}...
84 84 votes
6 answers 6 answers
28.2k
28.2k views
go_editor asked Feb 13, 2015
28,241 views
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 ...
54 54 votes
5 answers 5 answers
13.6k
13.6k views
go_editor asked Feb 13, 2015
13,582 views
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...
47 47 votes
6 answers 6 answers
23.9k
23.9k views
go_editor asked Feb 13, 2015
23,908 views
The number of states in the minimal deterministic finite automaton corresponding to the regular expression $(0+1)^* (10)$ is _____.