# 2018q3 第 15 週測驗題
### 測驗 `1`
Virtual memory can be thought of as a mechanism that caches virtual pages in the physical memory. A virtual page can be stored at any physical page frame. Which of the following statement is true?
==作答區==
* `(a)` virtual memory is fully associative
* `(b)` virtual memory is set associative
* `(c)` virtual memory is direct mapped
### 測驗 `2`
If we need 32 bits to represent a virtual address and our page size is 4KB, how many page table entries (PTE) do we need?
==作答區==
* `(a)` 2^22^
* `(b)` 2^20^
* `(c)` 2^12^
* `(d)` 2^10^
### 測驗 `3`
A page table is a map of `<vpn, ppn>`, where vpn is a virtual page number and ppn is a physical page number. The process of generating the appropriate ppn for a vpn is referred to as:
==作答區==
* `(a)` address counting
* `(b)` address swapping
* `(c)` address translation
* `(d)` address protection
### 測驗 `4`
A single-level page table has only one table, where a multi-level page table has multiple tables organized in a hierarchical manner. Which of the following statements are true?
==作答區==
* `(a)` If your program uses 100% of the virtual address space (even the parts normally not used), having a multi-level page table requires less space than a single-level page table
* `(b)` For a multi-level page table, the amount of space it requires varies based on how many pages are in use
* `(c)` For a single-level page table, the amount of space it requires varies based on how many pages are in use
### 測驗 `5`
A page table is a map of `<vpn, ppn>`, where vpn is a virtual page number and ppn is a physical page number. The virtual address can be split as <vpn, po>, where po is the page offset. Given this information, how would you form the physical address?
==作答區==
* `(a)` `<ppn>`
* `(b)` `<ppn, vpn>`
* `(c)` `<ppn, po>`
* `(d)` `<vpn, po>`