Computer Architecture - Old Questions
1. Explain address mapping using pages. A virtual memory system has an address space of 8K words, a memory space of 4K words, and page and block sizes of 1K words The following page reference changes occur during a given time interval. (Only page changes are listed. If the same page is referenced again, it is not listed twice).
4 2 0 1 2 6 1 4 0 1 0 2 3 5 7
Determine the four pages that are resident in main memory after each page reference change if the replacement algorithm used is (a) FIFO (b) LRU
Address Mapping Using Pages
A physical memory is broken down into groups of equal
size called blocks or page frame and the groups of address space of the same
size as block is called pages.
Consider a computer a with address space =8K and memory space=4K
Virtual address has 13 bits. Since each page consists
of 210=1024 words, high-order 3 bits will specify one of 8 pages and
low-order 10 bits gives the line address within the pages.
In computer 2p words per page, p bits are used to specify a line address and remaining high-order bits of the virtual address specify the page number and an address for the memory page table. Line address in memory space and address space is same; only mapping required is from page number to a block number.
The memory page table consists of 8 words, one for
each page. The address in the page table denotes page number and the content of
word gives the block number where the page is stored in main memory.
Presence bit when 0 indicates page is not available in main memory and when 1 indicates that page has been transferred to main memory. Table shows that pages 1, 2, 5 & 6 are now available in main memory in blocks 3, 0, 1 & 2 respectively.
Second Part