Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A system of 64K virtual memory with page size 4K is mapped to a 32K main memory

ID: 3902624 • Letter: A

Question

A system of 64K virtual memory with page size 4K is mapped to a 32K main memory as shown below.

What physical location will the virtual address 0010 000000000011 be mapped to?
A. 010 000000000011
B. 011 000000000010
C. 0011 000000000010
D. 110 000000000011
E. 010 000000000000

page # 64K virtual
Mem frame # page # 32K main
Mem frame # 0 0
4K 2 1
8 K 1 2
12 K 6 3
16 K 0 4
20 K 4 5
24 K 3 6
28 K X 7
32 K X 8
36 K X 9
40 K 5 10
44 K X 11
48 K 7 12
52 K X 13
56 K X 14
60 K X 15
64 K X 3 0
4K 0 1
8 K 1 0
12 K 2 5
16 K 3 4
20 K 4 9
24 K 5 2
28 K 6 11
32 K 7

Explanation / Answer

Answer to the question is option A. 010 000000000011

Virtual address is 64K so the number of bits required to store it is log2(64k) = 16, so is the virtual address given in the question 16 bit. Page size is 4k. Number of bits required is log2(4k) = 12. Now we know offset bits are 12. so the last 12 bits of the address remain the same.

Number of bits required to represent physical address is log2(32k) = 15 bits. Offset bits -12 remain same. So we need to convert 4 bits to 3 bits(in this case). In order to find the conversion of first 4 bits is using the reference table given. The table has a mapping of X for 0010(the 4 bits we are looking for). X represent value 0 in physical memory, which is again mapped to value 2. Binary conversion of 2 in 3 bits is 010. Hence the anser is 010 000000000011

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote