uc3m_cs

Materials used for Computer Structure

Exercise 1

(statement)

Let be a 20-bit computer with virtual memory paged with 1 KiB pages and a total physical memory of 512 KB.
It is asked, in a reasoned and brief form:
  1. What is the format of the virtual address? Indicate the fields and the number of bits in the fields.
  2. What is the maximum number of page table entries (one level)?
  3. How many page frames does the main memory have?
  4. What are the fields that are included in a page table entry? Also indicate what each of the fields is used for.

(solution)

  1. The size of each page is 1 KB = 210 bytes. Because the virtual address has 20 bits, to identify a page it is needed 20 - 10 = 10 bits. Therefore, the format uses the upper 10 bits of the address for the page number and the lower 10 bits for the offset within the page.
  2. The maximum number of entries in the page table coincides with the maximum number of pages, i.e. 210 = 1024 entries.
  3. The number of page frames is given by 512 KB / 1 KB = 512 frames.
  4. Each entry in the page table includes, among other things:
    • Presence bit
    • Modified bit
    • Validity bit
    • Field where the frame identifier is stored
    </ol> </html>