NEOCODE

Memory Management MCQs

LOGICAL & PHYSICAL ADDRESS SPACE

1. The address generated by the CPU is known as:

Correct Answer: b) Logical Address

Explanation:
The CPU generates logical (virtual) addresses which are then translated to physical addresses by the MMU (Memory Management Unit).

2. The address seen by the memory unit is called:

Correct Answer: b) Physical Address

Explanation:
The memory unit only deals with physical addresses - the actual locations in physical memory where data is stored.

3. The mapping from logical to physical address is done by:

Correct Answer: b) Memory Management Unit (MMU)

Explanation:
The MMU is the hardware component that performs address translation using page tables maintained by the OS.

4. Which of the following is true about logical address space?

Correct Answer: b) It is larger than physical address space in virtual memory

Explanation:
Virtual memory systems allow the logical address space to be much larger than physical memory by using disk space as an extension.

SWAPPING

5. Swapping is a technique in which:

Correct Answer: c) Both a and b

Explanation:
Swapping involves moving entire processes between main memory and disk (swap space) to free up memory for other processes.

6. The main disadvantage of swapping is:

Correct Answer: b) High disk I/O overhead

Explanation:
Swapping requires significant disk I/O operations which are much slower than memory access, causing performance overhead.

7. In swapping, the process must be:

Correct Answer: b) Completely loaded in memory

Explanation:
Traditional swapping requires the entire process to be in memory (or entirely swapped out), unlike paging which allows partial residency.

8. Which of the following is not a swapping technique?

Correct Answer: c) Demand Paging

Explanation:
Demand paging is a different memory management technique that loads pages on demand rather than swapping entire processes.

CONTIGUOUS MEMORY ALLOCATION

9. In contiguous memory allocation, memory is divided into:

Correct Answer: b) Variable-size blocks

Explanation:
Contiguous allocation assigns variable-sized memory blocks to processes based on their requirements.

10. The problem of external fragmentation occurs in:

Correct Answer: c) Contiguous Allocation

Explanation:
External fragmentation occurs when free memory is broken into small, non-contiguous pieces that can't be used for new allocations.

11. Which of the following is used to reduce external fragmentation?

Correct Answer: a) Compaction

Explanation:
Compaction moves allocated memory blocks together to create larger contiguous free blocks, though it's computationally expensive.

12. The best-fit memory allocation strategy:

Correct Answer: a) Allocates the smallest hole that is big enough

Explanation:
Best-fit searches for the smallest available memory block that can satisfy the request, minimizing wasted space.

PAGING

13. In paging, the physical memory is divided into fixed-size blocks called:

Correct Answer: a) Frames

Explanation:
Physical memory is divided into frames, while logical memory is divided into pages of the same size.

14. The logical memory is divided into fixed-size blocks called:

Correct Answer: b) Pages

Explanation:
The process's view of memory (logical address space) is divided into equal-sized pages that map to physical frames.

15. The mapping between page and frame is stored in:

Correct Answer: a) Page Table

Explanation:
The page table maintains the mapping of logical page numbers to physical frame numbers for each process.

16. The main advantage of paging is:

Correct Answer: a) No external fragmentation

Explanation:
Paging eliminates external fragmentation because any page can be placed in any available frame, though small internal fragmentation may occur.