Page 4 of 5 3. The page table in Fig. 3 shows the mapping between 64-KB virtual
ID: 3725315 • Letter: P
Question
Page 4 of 5 3. The page table in Fig. 3 shows the mapping between 64-KB virtual Vetual address address space and 32-KB physical address space (the page size is 4 KB) Answer the following questions. (I) Compute virtual page number and offset for $800.10000.22000, and 5-evintua page 56K-60KX 52K-56K 48K-52K 44K-48K7 40K-44KX 36K-40K5 32K-36K 28K-32KX 24K-28K X 20K-24K3 27000 Physical memory adcress 28K-32K 24K-2k 20K-24K 16K-20K4H 18K-20K 12K-16K 0 12K-16K 8K-12K 8K-12K6 4K-8K 4K-BK OK-4K Page frame Fig.3 (2) Compute the physical address for the virtual addresses 8800,10000, 22000, and 27000.Explanation / Answer
Question 1:
a. Virtual address = 8800
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 8800 % 4KB = 8800 % 4000 = 800
8800 Lies in range of (8K – 12K) in Virtual Memory which is provided page Number 6 (By Page table).
Thus, Virtual Page Number is 6 and offset is 800.
b. Virtual address = 10000
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 10000 % 4KB = 10000 % 4000 = 2000
10000 Lies in range of (8K – 12K) in Virtual Memory which is provided page Number 6 (By Page table).
Thus, Virtual Page Number is 6 and offset is 2000.
c. Virtual address = 22000
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 22000 % 4KB = 22000 % 4000 = 2000
22000 Lies in range of (20K – 24K) in Virtual Memory which is provided page Number 3 (By Page table).
Thus, Virtual Page Number is 3 and offset is 2000.
d. Virtual address = 27000
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 27000 % 4KB = 27000 % 4000 = 3000
27000 lies in range of (24K – 28K) in Virtual Memory which is not provided any page number, therefore it is not present in the Physical Memory.
Thus, Virtual Page Number is Not Defined and offset is 3000.
Question 2
a. Virtual address = 8800
Physical Address = Virtual Page Number * Page Size + Offset
= 6 * 4000 + 800 = 24800
Physical Address for 8800 is 24800
a. Virtual address = 10000
Physical Address = Virtual Page Number * Page Size + Offset
= 6 * 4000 + 2000 = 26000
Physical Address for 10000 is 26000
a. Virtual address = 22000
Physical Address = Virtual Page Number * Page Size + Offset
= 3 * 4000 + 2000 = 14000
Physical Address for 22000 is 14000
a. Virtual address = 8800
Since, there is not Virtual page number assigned to the address, we cannot have any Physical address for it.
No Physical Address
Question 1:
a. Virtual address = 8800
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 8800 % 4KB = 8800 % 4000 = 800
8800 Lies in range of (8K – 12K) in Virtual Memory which is provided page Number 6 (By Page table).
Thus, Virtual Page Number is 6 and offset is 800.
b. Virtual address = 10000
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 10000 % 4KB = 10000 % 4000 = 2000
10000 Lies in range of (8K – 12K) in Virtual Memory which is provided page Number 6 (By Page table).
Thus, Virtual Page Number is 6 and offset is 2000.
c. Virtual address = 22000
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 22000 % 4KB = 22000 % 4000 = 2000
22000 Lies in range of (20K – 24K) in Virtual Memory which is provided page Number 3 (By Page table).
Thus, Virtual Page Number is 3 and offset is 2000.
d. Virtual address = 27000
Page Offset = Physical Address % Page Size (Modulus i.e. Remainder)
= 27000 % 4KB = 27000 % 4000 = 3000
27000 lies in range of (24K – 28K) in Virtual Memory which is not provided any page number, therefore it is not present in the Physical Memory.
Thus, Virtual Page Number is Not Defined and offset is 3000.
Question 2
a. Virtual address = 8800
Physical Address = Virtual Page Number * Page Size + Offset
= 6 * 4000 + 800 = 24800
Physical Address for 8800 is 24800
a. Virtual address = 10000
Physical Address = Virtual Page Number * Page Size + Offset
= 6 * 4000 + 2000 = 26000
Physical Address for 10000 is 26000
a. Virtual address = 22000
Physical Address = Virtual Page Number * Page Size + Offset
= 3 * 4000 + 2000 = 14000
Physical Address for 22000 is 14000
a. Virtual address = 8800
Since, there is not Virtual page number assigned to the address, we cannot have any Physical address for it.
No Physical Address
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.