OS & Networking

Memory Management — Practice MCQs for CCAT

20 Questions Section B: Programming OS & Networking

Practice 20 Memory Management multiple-choice questions designed for CDAC CCAT exam preparation. Click "Show Answer" to reveal the correct option with detailed explanation.

Q1.
Paging eliminates:
AInternal fragmentation
BExternal fragmentation
CBoth
DNeither
Show Answer & Explanation

Correct Answer: B — External fragmentation

Paging eliminates external fragmentation (may have internal).

Q2.
Segmentation is based on:
AFixed size partitions
BLogical divisions of program
CRandom allocation
DContiguous allocation
Show Answer & Explanation

Correct Answer: B — Logical divisions of program

Segmentation divides memory based on logical units (code, data, stack).

Q3.
Which page replacement is optimal?
AFIFO
BLRU
COptimal (Belady's)
DRandom
Show Answer & Explanation

Correct Answer: C — Optimal (Belady's)

Optimal algorithm replaces page not needed for longest time (theoretical).

Q4.
TLB stands for:
ATable Lookup Buffer
BTranslation Lookaside Buffer
CTransfer Load Buffer
DTotal Logical Block
Show Answer & Explanation

Correct Answer: B — Translation Lookaside Buffer

TLB is a cache for page table entries to speed up address translation.

Q5.
Best fit allocation:
AUses first available hole
BUses smallest sufficient hole
CUses largest hole
DRandom hole
Show Answer & Explanation

Correct Answer: B — Uses smallest sufficient hole

Best fit finds smallest hole that is big enough.

Q6.
First fit allocation:
AScans all holes
BUses first sufficient hole
CUses best hole
DUses worst hole
Show Answer & Explanation

Correct Answer: B — Uses first sufficient hole

First fit allocates first hole that is large enough.

Q7.
Internal fragmentation occurs in:
AVariable partitioning
BFixed partitioning/Paging
CSegmentation
DBest fit
Show Answer & Explanation

Correct Answer: B — Fixed partitioning/Paging

Fixed size partitions cause internal fragmentation (unused space within partition).

Q8.
Page table maps:
APhysical to virtual
BVirtual page to physical frame
CDisk to memory
DProcess to memory
Show Answer & Explanation

Correct Answer: B — Virtual page to physical frame

Page table translates virtual page numbers to physical frame numbers.

Q9.
Demand paging loads pages:
AAll at once
BOnly when needed
CNever
DRandomly
Show Answer & Explanation

Correct Answer: B — Only when needed

Demand paging loads pages into memory only when accessed.

Q10.
Belady's anomaly is seen in:
ALRU
BOptimal
CFIFO
DLFU
Show Answer & Explanation

Correct Answer: C — FIFO

FIFO can have more page faults with more frames (Belady's anomaly).

Q11.
Virtual memory allows:
AOnly physical memory access
BPrograms larger than physical memory to run
CFaster disk access
DNo page faults
Show Answer & Explanation

Correct Answer: B — Programs larger than physical memory to run

Virtual memory allows execution of programs larger than available physical memory.

Q12.
Page fault occurs when:
APage is in memory
BRequired page is not in memory
CCPU is idle
DProcess terminates
Show Answer & Explanation

Correct Answer: B — Required page is not in memory

Page fault occurs when the required page is not found in main memory.

Q13.
Thrashing occurs when:
ACPU utilization is high
BSystem spends more time paging than executing
CMemory is empty
DNo page faults occur
Show Answer & Explanation

Correct Answer: B — System spends more time paging than executing

Thrashing occurs when excessive paging reduces CPU utilization dramatically.

Q14.
Working set model is used to:
AIncrease page faults
BDetermine optimal page allocation
CSpeed up disk
DCompress memory
Show Answer & Explanation

Correct Answer: B — Determine optimal page allocation

Working set model determines the set of pages a process actively uses.

Q15.
Compaction is used to:
ACreate fragmentation
BReduce external fragmentation
CIncrease memory size
DDelete processes
Show Answer & Explanation

Correct Answer: B — Reduce external fragmentation

Compaction combines free memory fragments into one contiguous block.

Q16.
Logical address is also called:
APhysical address
BVirtual address
CReal address
DDisk address
Show Answer & Explanation

Correct Answer: B — Virtual address

Logical address (virtual address) is generated by CPU; mapped to physical address.

Q17.
MMU stands for:
AMemory Management Unit
BMain Memory Unit
CMemory Mapping Unit
DMultiple Memory Unit
Show Answer & Explanation

Correct Answer: A — Memory Management Unit

MMU (Memory Management Unit) translates virtual addresses to physical addresses.

Q18.
Page size is typically:
AVariable
BFixed (power of 2)
CDetermined by user
DEqual to frame size and fixed
Show Answer & Explanation

Correct Answer: D — Equal to frame size and fixed

Page size equals frame size and is fixed, typically a power of 2 (e.g., 4KB).

Q19.
LRU page replacement:
AReplaces first loaded page
BReplaces least recently used page
CReplaces random page
DReplaces most used page
Show Answer & Explanation

Correct Answer: B — Replaces least recently used page

LRU replaces the page that has not been used for the longest time.

Q20.
Swapping involves:
AExchanging data between cache and RAM
BMoving entire process between memory and disk
CCopying files
DNetwork data transfer
Show Answer & Explanation

Correct Answer: B — Moving entire process between memory and disk

Swapping moves entire processes between main memory and disk.