Free Practice Quiz Question List

6 Memory Management and Virtual Memory Online Quiz Questions

Use this free practice quiz with 20 questions to review 6 Memory Management and Virtual Memory, test your knowledge, and prepare for your next test or exam.

20 questions
01
True or false
1 point

True or false: Threads belonging to the same process typically share its address space.

  1. A

    True

  2. B

    False

02
True or false
1 point

True or false: If a process accesses an address that violates the page’s permissions, the operating system handles it by loading the page into RAM and restarting the instruction.

  1. A

    True

  2. B

    False

03
Choose one
1 point

What is the main role of a translation lookaside buffer (TLB) during memory access?

  1. A

    It stores modified file contents until they are written to backing storage.

  2. B

    It caches recent virtual-to-physical address translations.

  3. C

    It divides a process’s address space into variable-sized logical regions.

  4. D

    It allocates requested blocks within a program’s runtime.

04
Choose one
1 point

With 4 KiB pages, virtual address 0x12345 has virtual page number 0x12 and offset 0x345. If page 0x12 maps to physical frame 0x2A, what physical address results?

  1. A

    0x12345

  2. B

    0x2A345

  3. C

    0x2A12

  4. D

    0x3452A

05
Choose one
1 point

A program reads from a file-backed region of its address space, but the needed file page is not currently in RAM. What is a likely result of that first access?

  1. A

    The program must first copy the file into its own buffer using physical disk addresses.

  2. B

    Every read from the mapped region causes a page fault, even after the page is in RAM.

  3. C

    The first access can cause a page fault that prompts the operating system to load the relevant file data and establish the mapping.

  4. D

    The mapping gives the program direct control over which physical disk and RAM locations hold the data.

06
Choose all
1 point

Select all statements that correctly describe paging.

  1. A

    Virtual address spaces are divided into fixed-size pages, and physical memory into same-sized frames.

  2. B

    Each virtual page must occupy a physically contiguous region whose size matches the entire address space.

  3. C

    A page table records which physical frame, if any, holds each virtual page.

  4. D

    Paging avoids external fragmentation in physical-memory allocation because any available frame can hold a page.

  5. E

    Paging guarantees that no space inside an allocated region is ever unused.

07
Choose all
1 point

Select all statements that accurately describe virtual memory and file-backed mappings.

  1. A

    A process’s address space can be larger than the portion of it currently resident in RAM.

  2. B

    Every region in a process’s address space must be backed by swap space.

  3. C

    Two processes can map the same read-only program-file pages while keeping separate private data.

  4. D

    File-backed mappings can connect a file to a process’s virtual address space.

  5. E

    Virtual memory makes disk access as fast as access to RAM.

08
Written response
1 point

In a simple segmentation model, a segment has base 10001000 and limit 300300. A valid address uses offset 240240. What physical address results? Enter a decimal number.

09
Fill in the blank
1 point

In paging, virtual address spaces are divided into fixed-size , while physical memory is divided into same-sized .

10
Fill in the blank
1 point

When a process accesses a valid page that is not resident in RAM, the operating system often , , and then .

11
Open ended
1 point

Describe the roles of the code, global-data, heap, and stack regions commonly found in a process’s address space. Explain how the heap and stack differ.

12
Choose one
1 point

A program requests memory through a runtime allocator such as malloc. Which task is most directly associated with that allocator?

  1. A

    The runtime allocator maps virtual pages to physical frames and enforces process permissions.

  2. B

    The runtime allocator manages requested blocks and may obtain larger regions from the operating system.

  3. C

    The runtime allocator translates every virtual address directly into a disk location.

  4. D

    The runtime allocator sets the physical base and limit for every process segment.

13
Choose one
1 point

A program accesses a virtual address in its address space. Which component performs the translation to a physical address in RAM?

  1. A

    The operating system translates physical addresses into virtual addresses before a program uses them.

  2. B

    The MMU translates a process’s virtual addresses into physical addresses.

  3. C

    The runtime allocator translates virtual addresses directly into file offsets.

  4. D

    The page table assigns each process a separate physical RAM chip.

14
True or false
1 point

True or false: If a process accesses an invalid address, the operating system handles the resulting page fault by loading that address’s page into RAM.

  1. A

    True

  2. B

    False

15
Choose one
1 point

Two processes run the same program. Which arrangement can let them share program pages without making their private data the same?

  1. A

    The processes must use identical virtual addresses for all their data.

  2. B

    The operating system copies the entire program into RAM separately for each process.

  3. C

    Both processes can map the same read-only program-file pages while keeping private data separate.

  4. D

    The processes share one address space, so neither can have private data.

16
Choose one
1 point

A system uses 4 KiB pages. Virtual address 0x12345 is in virtual page 0x12, which maps to physical frame 0x2A. What physical address results?

  1. A

    0x2A123

  2. B

    0x2A345

  3. C

    0x12345

  4. D

    0x3452A

17
Choose one
1 point

In a simple segmentation model, a process accesses a segment with a base of 8000 and a limit of 1200. Which rule determines whether an offset can be translated?

  1. A

    Translate every offset by adding it to the base, even when it exceeds the limit.

  2. B

    Use the offset as the physical address and ignore the base.

  3. C

    Add the offset to the base only when the offset is within the segment’s limit.

  4. D

    Replace the offset with a page-frame number from the TLB.

18
Written response
1 point

What is the term for free memory split into separate pieces that are each too small to satisfy a requested allocation?

19
Written response
1 point

What does TLB stand for in the context of address translation?

20
Written response
1 point

A variable-sized allocator gives a program a 64-byte block for a 50-byte request. How many bytes of unused space remain inside the allocated block? Enter the number in bytes.