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:
- What is the format of the virtual address? Indicate the fields and the number of bits in the fields.
- What is the maximum number of page table entries (one level)?
- How many page frames does the main memory have?
- What are the fields that are included in a page table entry? Also indicate what each of the fields is used for.
(solution)
- 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.
- The maximum number of entries in the page table coincides with the maximum number of pages, i.e. 210 = 1024 entries.
- The number of page frames is given by 512 KB / 1 KB = 512 frames.
- 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>