A: virtual address is composed of two parts; an offset and a virtual page frame number. If
The page size is 4 Kbytes; bits 11:0 of the virtual address contain the offset and bits 12
And above is the virtual page frame number.
Each time the processor encounters a virtual address it must extract the offset and the
Virtual page frame number. The processor must translate the virtual page frame number into a physical one and then access the location at the correct offset into that physical page. To do this the processor uses page tables.
The processor uses the virtual page frame number as an index into the processes page table to retrieve its page table entry. If the page table entry at that offset is valid, the
Processor takes the physical page frame number from this entry. If the entry is invalid, the process has accessed a non-existent area of its virtual memory. This is called Page fault.
In this case, the processor cannot resolve the address and must pass control to the operating system so that it can fix things up.