Virtual memory Flashcards
What do most virtual memory systems use?
paging
what is the basic idea of virtual memory?
combined size of a program likely to exceed memory available for it.
So, chop it up and have parts in use in memory, and the other parts on disk.
What is another term for a programmed address?
virtual address
Virtual addresses form [x]
virtual address space
On computer without virtual memory, [x]
virtual address is put directly onto memory bus and physical word is read or written
When virtual memory memory is used [x]
virtual addresses go to an MMU
The MMU [x]
maps virtual addresses onto physical addresses
The virtual address space is [x] into units called [y]
x = divided y = pagees
The corresponding unit in actual memory from a page is called the
page frame
What is important about size of pages to page frames?
They are exactly the same
When a program tries to access address 0, what happens?
Virtual address - sent to MMU
MMU sees that virtual address falls on a page number
That page number maps to page frame 2 which has a physical address [y]
It outputs physical address [y] onto the bus
What keeps track of which pages are physically present in memory?
Present/absent bit
What happens if a page is not mapped?
MMU notices and causes the CPU to trap.
What is a CPU trap called in the instance of not finding a page mapping?
page fault
What happens after a page fault?
1) Operating system picks a page, writes its contents to disk.
2) It then fetches the references page and writes it to the page frame just wiped.
3) It changes the mapping
4) It restarts
What is the purpose of the page table?
map virtual pages onto page frames.
How many page tables are created?
As many page tables as there are processes.
Why does each process need its own page table?
Because each process has its own virtual address space
What is the most important field in a page table?
Page frame number
What fields are in a page table?
Page frame number Present/absent bit Protection bit Modified bit Referenced bit Caching disabled bit