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

17. A computer system implements a paged virtual memory system. Assume a 16-bit

ID: 3719996 • Letter: 1

Question

 17. A computer system implements a paged virtual memory system. Assume a 16-bit virtual address space and a 24-bit physical address space. Assume that the first 6 bits of a virtual address index the page table and the rest of the bits are the page offset.  A process has the following indexed page table.                  Index | Page Table Entry (PTE)                   0   |   0x3800                   1   |   0x3600                   2   |   0x3200                   3   |   0x1000  Each page table entry gives a hexadecimal page frame addresses.  Translate the following two hexadecimal VM addresses into their corresponding hexadecimal physical address. Hint: Translate the VM address to binary first.       Translate the binary VM address to a binary PM address.       Translate the binary PM address into hexadecimal.   VM Address 0x084B is _____________________ in Physical Memory  VM Address 0x0C78 is _____________________ in Physical Memory

Explanation / Answer

Hexadecimal to binary conversion is simple for every hex character/digit there is corresponding 4 bits binary, we can replace hex character/digit from corresponding 4 bits binary number. (binary to hex does opposite binary string should be multiple of 4 digits long of not we add 0 in start of binary number to make total bits in binary number a multiple of 4)

0 = 0000

1 = 0001

2 = 0010

3 = 0011

4 = 0100

5 = 0101

6 = 0110

7 = 0111

8 = 1000

9 = 1001

A = 1010

B = 1011

C = 1100

D = 1101

E = 1110

F = 1111

Solution A:

0x084B =

Hex

0

8

4

B

Binary

0000

1000

0100

1011

Page Table index = 0000 10 = 2 in decimal

Now page table index 2 will maps to Page Table Entry => 0x3200 (frame starting at physical memory address)

Page Offset = 00 0100 1011 in binary = 0x04B in hex

Final Physical memory address = base physical address + offset of page

                                                           = 0x3200 + 0x04B

                                                            = 0x324B Ans

Solution B:-

0x0C78

Hex

0

C

7

8

Binary

0000

1100

0111

1000

Page Table Index = 0000 11 = 3 in decimal

Now page table index 3 will maps to Page Table Entry => 0x1000 (frame starting at physical memory address)

Page Offset = 00 0111 1000 in binary = 0x078 in hex

Final Physical memory address = base physical address + offset of page

                                                           = 0x1000 + 0x078

                                                            = 0x1078 Ans

0 = 0000

1 = 0001

2 = 0010

3 = 0011

4 = 0100

5 = 0101

6 = 0110

7 = 0111

8 = 1000

9 = 1001

A = 1010

B = 1011

C = 1100

D = 1101

E = 1110

F = 1111

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