Memory cont. #
Page tables / addressing cont. #

- the more hierarchy you have, the more memory accesses you need

Hashed page tables #

- we can use either method of resolving collision in the hash table: chaining or linear probing
Inverted page table #

- instead of keep track of logical pages, we keep track of physical pages
- notice that we add a new field to the logical address:
pid - a linear search is involved at worst case, so the page table can be improved by using a hash table
Virtual memory #
Memory for the point of view of the program.

- how can we run a program that will use more memory than totally available?
- we’ll just load what is necessary

When to load a page? #

- pages with the invalid bit do not have a frame number
Page fault #
If there is a reference to a page, but it is not in memory, it causes a page fault.

Demand paging #

- evicted pages go to swap, incase we need to bring it back soon
- swap space can be in memory, or on hard drive

Page replacement algorithms #

- looks at when page was loaded, picks the oldest
- implement with FIFO queue

- theoretically the best, but relies on knowing the future
