Consider a virtual memory system with paging. A program is partitioned into several virtual pages, with the first virtual page numbered 0. The hardware main memory is also partitioned into several physical pages, with the first physical page numbered 0. Assume the page size is 1KB (B = bytes). A physical address is represented by 12 binary bits. A virtual address is represented by 16 binary bits.
Suppose the program accesses data in two virtual addresses 0x45CB, and 0x0F29.
When each address is accessed, the corresponding virtual page should be first loaded into some physical page in the main memory. The mapping from a virtual page (of the program) to the physical page (of the main memory) is as follows: given a virtual page number X, the corresponding physical page number Y can be computed by: Y = mod(X+1, 4). mod(a, b) is a function computing a modular b, for example, mod(7, 2) = 7 % 2 = 1.
Write out the corresponding physical addresses of the above two virtual addresses.

Answer :

Other Questions