Memory Management and Paging # MCQs Practice set

Q.1 What is paging in operating systems?

A technique of virtual memory management
A method of file organization
A type of scheduling
A hardware device
Explanation - Paging is a memory management technique where a process is divided into fixed-size pages and loaded into frames of physical memory.
Correct answer is: A technique of virtual memory management

Q.2 In paging, the fixed-size block of physical memory is called?

Page
Segment
Frame
Block
Explanation - Pages are mapped to physical memory blocks called frames.
Correct answer is: Frame

Q.3 The page size in a paging system is decided by?

Operating System
Hardware
User
Compiler
Explanation - Page size is determined by the hardware architecture of the system.
Correct answer is: Hardware

Q.4 Page table is used for?

Mapping logical addresses to physical addresses
Mapping files to memory
Scheduling CPU tasks
Handling I/O operations
Explanation - The page table stores the mapping between logical pages and physical frames.
Correct answer is: Mapping logical addresses to physical addresses

Q.5 What does TLB stand for in memory management?

Translation Lookaside Buffer
Temporary Lookup Block
Table Lookup Buffer
Transitional Link Block
Explanation - TLB is a cache that stores recent translations of virtual memory to physical addresses.
Correct answer is: Translation Lookaside Buffer

Q.6 Page fault occurs when?

A page is not in main memory
A program terminates
A file is missing
A CPU error occurs
Explanation - A page fault happens when the requested page is not available in RAM and must be fetched from secondary storage.
Correct answer is: A page is not in main memory

Q.7 Which replacement algorithm replaces the page that has not been used for the longest time?

FIFO
LRU
Optimal
Random
Explanation - Least Recently Used (LRU) replaces the page that has not been used for the longest period of time.
Correct answer is: LRU

Q.8 Thrashing in memory management refers to?

Excessive page swapping
High CPU utilization
Fast memory access
Efficient caching
Explanation - Thrashing occurs when excessive paging reduces CPU efficiency due to constant swapping.
Correct answer is: Excessive page swapping

Q.9 Which algorithm gives the lowest page fault rate theoretically?

FIFO
LRU
Optimal
Clock
Explanation - The Optimal algorithm replaces the page that will not be used for the longest time in the future, achieving the least page faults.
Correct answer is: Optimal

Q.10 What is the main disadvantage of paging?

Internal fragmentation
External fragmentation
No protection
Complex scheduling
Explanation - Paging suffers from internal fragmentation as processes may not fully utilize the last allocated frame.
Correct answer is: Internal fragmentation

Q.11 What does MMU stand for?

Memory Management Unit
Main Memory Utility
Machine Memory Unit
Mapped Memory Utility
Explanation - The MMU is responsible for handling memory access and address translation.
Correct answer is: Memory Management Unit

Q.12 What is the size of a page in most systems?

Fixed
Variable
Defined by OS
Defined by user
Explanation - Pages are of fixed size in a paging system.
Correct answer is: Fixed

Q.13 Which structure holds the base address of the page table?

Page Table Register
Frame Register
Memory Register
Process Control Block
Explanation - The Page Table Register (PTR) stores the base address of the page table in memory.
Correct answer is: Page Table Register

Q.14 When is demand paging used?

Only required pages are loaded
All pages are preloaded
Pages are swapped randomly
Pages are locked permanently
Explanation - Demand paging loads pages only when they are required, reducing memory load.
Correct answer is: Only required pages are loaded

Q.15 What does 'hit ratio' in TLB mean?

Fraction of address translations found in TLB
Fraction of pages in RAM
CPU efficiency rate
Disk access rate
Explanation - Hit ratio indicates how often required page table entries are found in the TLB cache.
Correct answer is: Fraction of address translations found in TLB

Q.16 Which paging method uses a hierarchy of page tables?

Two-level paging
FIFO paging
LRU paging
Direct mapping
Explanation - Two-level paging reduces the size of page tables by using a hierarchy of tables.
Correct answer is: Two-level paging

Q.17 Segmentation differs from paging because?

Segments vary in size
Segments are fixed in size
Segments cause internal fragmentation
Segments are hardware only
Explanation - Unlike paging, segmentation divides memory into variable-sized segments based on logical divisions.
Correct answer is: Segments vary in size

Q.18 In paging, logical address is divided into?

Page number and offset
Segment and frame
Base and limit
Block and tag
Explanation - Logical address in paging consists of a page number and a page offset.
Correct answer is: Page number and offset

Q.19 The working set model is used to?

Reduce thrashing
Improve CPU scheduling
Manage cache
Handle interrupts
Explanation - The working set model estimates the set of pages needed by a process to reduce thrashing.
Correct answer is: Reduce thrashing

Q.20 Belady’s anomaly occurs in?

FIFO page replacement
LRU page replacement
Optimal replacement
Clock algorithm
Explanation - Belady’s anomaly is the unusual situation where increasing frames increases page faults, common in FIFO.
Correct answer is: FIFO page replacement

Q.21 Which algorithm approximates LRU using a reference bit?

Clock algorithm
FIFO
Optimal
Random
Explanation - Clock algorithm is an approximation of LRU, using a circular buffer and reference bits.
Correct answer is: Clock algorithm

Q.22 Virtual memory allows?

Execution of processes larger than physical memory
Faster execution of programs
Zero fragmentation
Only fixed-size programs
Explanation - Virtual memory allows processes to use more memory than physically available by paging to disk.
Correct answer is: Execution of processes larger than physical memory

Q.23 Inverted page table stores?

One entry per frame
One entry per page
One entry per process
One entry per instruction
Explanation - Inverted page tables keep one entry per physical frame, reducing memory usage.
Correct answer is: One entry per frame

Q.24 Page replacement is required when?

Page fault occurs and no free frame exists
Process ends
CPU halts
Disk is full
Explanation - Page replacement is triggered when a new page must be brought in but no free frames are available.
Correct answer is: Page fault occurs and no free frame exists

Q.25 What is the main purpose of swapping?

Increase multiprogramming
Increase CPU speed
Reduce fragmentation
Improve file I/O
Explanation - Swapping allows processes to be moved in and out of main memory to support more programs simultaneously.
Correct answer is: Increase multiprogramming