Paging Flashcards
(133 cards)
⭐️ What’s another method, apart from segmentation, that allows the physical address space of a process to be non-contiguous?
Paging
⭐️ Paging divides physical memory into fixed-size blocks, called
page frames
⭐️ Paging divides virtual memory into blocks of the same size called
pages
⭐️ Paging uses a page table for
address translation
⭐️ Does paging need both OS and hardware?
Yes
⭐️ What sort of fragmentation does paging avoid, and what sort of fragmentation doesn’t it avoid?
Avoids external fragmentation
Doesn’t avoid internal fragmentation
⭐️ The fact that paging doesn’t need to assume how the heap and stack grow and are used makes it more…
flexible
⭐️ The fact that the page in the address space and the page frame are the same size in paging makes it easy to allocate and keep a free list, this makes paging more…
simple
⭐️ To translate a page a virtual address is split into two parts, which are they?
Virtual Page Number (VPN) and offset
⭐️ Give the definition:
Used as an index into a page table which contains base address of each page in physical memory.
Virtual Page Number (VPN)
⭐️ Give the definition:
Combined with base address to define the physical memory address that is sent to the memory unit
Offset
⭐️ To determine where a physical page is in paging we only need to translate the…
page number
⭐️ What does the page table in paging do?
Keeps track of the mapping of virtual to physical addresses
⭐️ Give the definition:
A register that indicates the starting address of the page table
Page table base register
What does page sharing allow 2 pages to do?
Point to the same frame
⭐️ What is the simplest form a page table?
A linear page table
What does a Page Table Entry (PTE) include?
Translation information, etc.
Give the definition:
A sort of page table that has an entry for each physical page frame of the system. The entry tells us which process is using this page, and which virtual page of the process maps to this physical page
Inverted page table
What are the pros of inverted page tables?
Memory saving
What are the cons of inverted page tables?
Long searching time
Page sharing
How is page sharing implemented for a per-process page table?
By letting two pages point to the same frame
How is page sharing implemented for an inverted page table?
It’s difficult to implement; 2 virtual pages cannot point to the same frame due to inverted page tables only supporting 1:1 mapping
What is the biggest problem with paging?
The performance is affected by a factor of 2 due to every instruction requiring two memory accesses
Which 2 steps in every memory reference are memory accesses?
- Fetching page table address
- Fetching physical address to register