1,485 views

2 Answers

Best answer
0 votes
0 votes
In this case, the processor has a 32-bit virtual address and a 28-bit physical address, and the system uses 2 kb pages. The virtual address is divided into two parts: the virtual page number and the offset within the page. The physical address is also divided into two parts: the physical page number and the offset within the page.

The virtual page number is the part of the virtual address that specifies which page of virtual memory a program is accessing. The physical page number is the part of the physical address that specifies which page of physical memory the data is actually stored in. The offset is the part of the address that specifies the specific location within the page.

To determine the number of bits required for the virtual page number and the physical page number, we need to know the size of the pages and the size of the virtual and physical addresses. Since the pages are 2 kb in size, and there are 1024 bytes in a kilobyte, each page is 2048 bytes in size (2*1024). This means that the offset field of the address can be 11 bits long, since 2^11 is 2048.

Since the virtual address is 32 bits long and the offset field is 11 bits long, this leaves 32-11=21 bits for the virtual page number.

Since the physical address is 28 bits long and the offset field is 11 bits long, this leaves 28-11=17 bits for the physical page number.

Therefore, the virtual page number requires 21 bits and the physical page number requires 17 bits.
0 votes
0 votes
The correct answer is 21, 17. This is because a 32-bit virtual address has 21 bits for the virtual page number and 6 bits for the offset, while a 28-bit physical address has 10 bits for the physical page number and 18 bits for the offset.

Related questions

0 votes
0 votes
1 answer
1
arkaprava_gupta asked Dec 23, 2022
328 views
Which of the following processor registers are used for fetch and execute operations ?Program CounterInstruction RegisterAddress RegisterOptions :a and bb and ca and cNon...
0 votes
0 votes
3 answers
2
arkaprava_gupta asked Dec 23, 2022
517 views
Memory mapping table is used to(a) Translate virtual address to physical address(b) Translate physical address to virtual address(c) Both(d) None
1 votes
1 votes
1 answer
4