Operating Systems
Memory management
Paging, segmentation, the page table and TLB, and virtual memory.
In two minutes
One idea to a line
A logical address splits into a page number (address ÷ page size) and an offset (address mod page size). The page table gives the frame.
Paging has no external fragmentation but has internal fragmentation in the last page of a process. Segmentation is the other way round.
The TLB caches page table entries. Effective access time = hit ratio × (TLB + memory) + miss ratio × (TLB + 2 × memory) for a single-level table.
Virtual memory lets a process use more memory than is physically free: pages not in a frame are fetched on a page fault.
Thrashing: so many page faults that the system spends more time paging than running. Fewer processes or more frames fixes it.
Slips people make here
Interviewers know them too
Numbering pages from 1.
Leaving out the TLB search time on a miss (or on a hit).
Saying paging removes all fragmentation: only external fragmentation.
Your practice here
Not started
10 written questions, and 3 kinds of calculation that change every time
No answers yet