1. Home
  2. Explore
  3. Computer Science
  4. Virtual Memory Explained

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Virtual Memory Explained

  • 27Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Physical Addressing
In the early days of computing, the era of
meant that programs directly addressed physical memory without any abstraction.

27 questions

  1. 1
    In the early days of computing, the era of
    _____
    meant that programs directly addressed physical memory without any abstraction.
    Hint

    This approach had no translation layer; software talked directly to hardware.

    Answer

    physical addressing

  2. 2
    The main problem with physical addressing when running multiple programs was
    _____
    : programs could overwrite each other's memory.
    Hint

    Think about who 'owns' a memory location when multiple programs are in RAM.

    Answer

    ownership

  3. 3
    External fragmentation occurs when free memory is split into small gaps, making it impossible to load a program that requires a
    _____
    block of memory.
    Hint

    The program needed one unbroken stretch of memory.

    Answer

    contiguous

  4. 4
    In base and bounds, the
    _____
    register stores the physical starting address of a program in memory.
    Hint

    This register's value is added to every virtual address by the MMU.

    Answer

    base

  5. 5
    The
    _____
    register in base and bounds stores the maximum memory size the program is allowed to access.
    Hint

    This register defines the limit of the program's memory region.

    Answer

    bound

  6. 6
    When a program attempts to access an address beyond its bound, the CPU raises a hardware exception called a
    _____
    .
    Hint

    This error terminates the program and hands control back to the OS.

    Answer

    segmentation fault

  7. 7
    The process of
    _____
    in base and bounds involves the OS moving all programs together in RAM to eliminate gaps.
    Hint

    Think of reorganizing a bookshelf while people are reading.

    Answer

    compaction

  8. 8
    Segmentation improved upon base and bounds by giving a program multiple independent base and bound pairs called
    _____
    .
    Hint

    These parts include code, heap, and stack.

    Answer

    segments

  9. 9
    In segmentation, the code segment can be set to
    _____
    only, preventing accidental corruption of instructions.
    Hint

    This permission restricts modification of the segment.

    Answer

    read-only

  10. 10
    Segmentation allowed multiple instances of the same program to share a single
    _____
    segment in physical memory.
    Hint

    The instructions for the program are duplicated for each instance? Not with shared memory.

    Answer

    code

  11. 11
    Segmentation still suffered from external fragmentation because segments were
    _____
    in size.
    Hint

    Unlike fixed-size blocks, segments sizes differ.

    Answer

    variable

  12. 12
    In paging, physical RAM is divided into small fixed-size slots called
    _____
    .
    Hint

    These are the physical counterparts to virtual pages.

    Answer

    page frames

  13. 13
    The program's virtual address space is divided into fixed-size pieces called
    _____
    .
    Hint

    These are the same size as page frames.

    Answer

    pages

  14. 14
    Paging eliminates external fragmentation because any page can be placed into any free
    _____
    .
    Hint

    All allocation units are the same size.

    Answer

    page frame

  15. 15
    A downside of paging is
    _____
    fragmentation, where allocated pages waste space if the program needs less than a full page.
    Hint

    Think of the space inside a page that is unused.

    Answer

    internal

  16. 16
    The
    _____
    is a data structure used by the OS to map virtual pages to physical page frames.
    Hint

    It acts as a master map for address translation.

    Answer

    page table

  17. 17
    Paging introduces a latency penalty because each memory access requires two RAM lookups: one for the page table and one for the
    _____
    .
    Hint

    After translation, you still need to fetch the actual content.

    Answer

    data

  18. 18
    The
    _____
    is a hardware cache that stores recent virtual-to-physical address translations to speed up paging.
    Hint

    Its acronym stands for Translation Lookaside Buffer.

    Answer

    TLB

  19. 19
    A
    _____
    occurs when a translation is found in the TLB, resulting in a fast address translation.
    Hint

    The opposite is a miss.

    Answer

    TLB hit

  20. 20
    When the TLB does not contain a translation, the system must perform a slow
    _____
    to find the physical address.
    Hint

    This involves accessing the page table in memory.

    Answer

    page table walk

  21. 21
    In demand paging, the OS initially loads only the minimum pages needed and marks others as
    _____
    in the page table.
    Hint

    This flag indicates the page is not in RAM.

    Answer

    not present

  22. 22
    A
    _____
    is a hardware exception raised when a program accesses a page marked as not present.
    Hint

    This is not a crash but an opportunity for the OS to load the page.

    Answer

    page fault

  23. 23
    During a page fault, the OS loads the missing page from the
    _____
    into an empty page frame.
    Hint

    The page resides on secondary storage before being brought into RAM.

    Answer

    disk

  24. 24
    When RAM is full, the OS must
    _____
    an existing page to make room for a new page.
    Hint

    This means removing a page from RAM, possibly writing it back to disk.

    Answer

    evict

  25. 25
    A common page replacement policy that evicts the page that hasn't been used for the longest time is called
    _____
    .
    Hint

    It exploits temporal locality.

    Answer

    least recently used (LRU)

  26. 26
    When a system is so low on RAM that it constantly swaps pages in and out, it enters a state called
    _____
    .
    Hint

    The system spends more time swapping than executing.

    Answer

    thrashing

  27. 27
    During thrashing, the CPU spends less than 1% of its time actually running code and the rest frantically moving data between RAM and
    _____
    .
    Hint

    The slow secondary storage is the bottleneck.

    Answer

    disk

1 of 27
Question 1 of 27

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent