Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Memory ManagementEasy
Q1. Paging divides:
- A.The disk into sectors and track clusters
- B.Processes into variable-size logical segments
- C.Physical memory into frames, logical into pages✓ Correct
- D.The CPU into separate processing partitions
Explanation
Paging divides physical memory into fixed-size blocks called frames and logical memory into blocks of the same size called pages. A page table maps pages to frames.
Report an error in this question
Memory ManagementMedium
Q2. The FIFO page replacement algorithm replaces:
- A.The page that has been in memory longest✓ Correct
- B.The least recently used page in memory
- C.The most frequently used page in memory
- D.A random page selected from the frames
Explanation
FIFO replaces the oldest page in memory (the one that was loaded first). It is simple but can suffer from Belady's anomaly where more frames can lead to more page faults.
Report an error in this question
Memory ManagementMedium
Q3. Belady's anomaly states that:
- A.More frames can increase faults for some algorithms✓ Correct
- B.More memory always reduces total page faults
- C.LRU always outperforms FIFO in every situation
- D.Optimal page replacement causes most page faults
Explanation
Belady's anomaly is the counterintuitive observation that for some algorithms (notably FIFO), increasing the number of available page frames can actually increase the number of page faults.
Report an error in this question
Memory ManagementMedium
Q4. In demand paging, pages are loaded into memory:
- A.All at once when the process first starts
- B.Based on a predetermined schedule
- C.Only when they are actually referenced✓ Correct
- D.Randomly without any specific order
Explanation
Demand paging loads a page into memory only when it is referenced (accessed). This is a lazy approach that avoids loading pages that may never be used, saving memory.
Report an error in this question
Memory ManagementEasy
Q5. Virtual memory allows:
- A.Only one process to run at any given time
- B.Programs larger than physical memory to execute✓ Correct
- C.Faster CPU execution by clock overclocking
- D.Direct access to underlying hardware devices
Explanation
Virtual memory allows the execution of programs that are larger than physical memory by keeping only necessary portions in RAM and storing the rest on disk, swapping pages as needed.
Report an error in this question
Memory ManagementEasy
Q6. A page fault occurs when:
- A.A referenced page is not in physical memory✓ Correct
- B.A page has become corrupted in memory
- C.The page table is completely full of entries
- D.A page is too large to fit in any frame
Explanation
A page fault occurs when a process tries to access a page that is mapped in its virtual address space but is not currently loaded in physical memory, requiring the OS to load it from disk.
Report an error in this question
Memory ManagementMedium
Q7. Thrashing occurs when:
- A.The CPU is idle and not running tasks
- B.Memory is completely free and available
- C.A process pages more than it executes✓ Correct
- D.Too few processes are currently running
Explanation
Thrashing occurs when a process does not have enough frames and constantly pages in and out. The system spends most of its time handling page faults instead of useful computation.
Report an error in this question
Memory ManagementMedium
Q8. The first-fit memory allocation algorithm:
- A.Allocates memory blocks at random
- B.Searches for the smallest suitable hole
- C.Allocates the first hole large enough✓ Correct
- D.Allocates the largest available hole
Explanation
First-fit allocates the first memory hole that is large enough to satisfy the request. It is fast because it doesn't need to search the entire list.
Report an error in this question
Memory ManagementEasy
Q9. Physical address is:
- A.An address generated by the CPU logic
- B.A virtual address used by programs
- C.An IP address on the local network
- D.The actual address in memory hardware✓ Correct
Explanation
A physical address is the actual address in the physical memory hardware. It is the address that appears on the memory address bus and is used to access data in RAM.
Report an error in this question
Memory ManagementMedium
Q10. The Translation Lookaside Buffer (TLB) is:
- A.A disk cache for swap file contents
- B.A fast cache for page table entries✓ Correct
- C.A type of random access memory chip
- D.A backup copy of the main page table
Explanation
The TLB is a small, fast associative cache that stores recently used page table entries. It reduces the time for address translation by avoiding page table lookups for frequently accessed pages.
Report an error in this question
Memory ManagementHard
Q11. What is a multi-level page table and why is it used?
- A.A page table with multiple entries per page
- B.Hierarchical structure saving memory for sparse spaces✓ Correct
- C.A page table stored entirely on secondary disk
- D.A table shared by multiple running processes
Explanation
Multi-level page tables use a hierarchy of page tables (e.g., outer and inner page tables). Only the outer table must be in memory; inner tables are created only for used portions of the address space, saving memory.
Report an error in this question
Memory ManagementEasy
Q12. Logical address is:
- A.The network address assigned to a device
- B.An address generated by CPU for translation✓ Correct
- C.The physical location in hardware memory
- D.The address of data on the hard disk drive
Explanation
A logical (virtual) address is generated by the CPU during program execution. It is translated to a physical address by the Memory Management Unit (MMU) before accessing actual memory.
Report an error in this question
Memory ManagementEasy
Q13. Internal fragmentation occurs when:
- A.No memory is available to allocate to processes
- B.The file system is corrupted and cannot allocate blocks
- C.Allocated block is larger than requested, wasting space✓ Correct
- D.Free memory is scattered in small pieces across RAM
Explanation
Internal fragmentation occurs when the allocated memory block is larger than what was requested (e.g., due to fixed-size allocation units), wasting the difference.
Report an error in this question
Memory ManagementMedium
Q14. Segmentation divides a program into:
- A.Equal-sized partitions of memory
- B.Fixed-size pages of equal length
- C.Variable-size segments like code and data✓ Correct
- D.Random blocks of varying sizes
Explanation
Segmentation divides a program into logical units (segments) of variable sizes, such as main program, functions, data structures, stack, and library functions, reflecting the program's logical structure.
Report an error in this question
Memory ManagementEasy
Q15. External fragmentation occurs when:
- A.The disk is completely full and cannot store data
- B.The allocated pages are much too large for use
- C.Internal memory within blocks is wasted by padding
- D.Free memory is scattered, cannot satisfy requests✓ Correct
Explanation
External fragmentation occurs when total free memory is sufficient but it is not contiguous. Small, scattered free blocks exist but none is large enough to satisfy a request.
Report an error in this question
Memory ManagementEasy
Q16. The Memory Management Unit (MMU) is responsible for:
- A.Managing I/O device controllers
- B.Scheduling processes on the CPU
- C.Translating logical to physical addresses✓ Correct
- D.Managing the file system on disk
Explanation
The MMU is a hardware component that translates logical (virtual) addresses generated by the CPU to physical addresses in memory at runtime.
Report an error in this question
Memory ManagementMedium
Q17. The LRU (Least Recently Used) page replacement algorithm replaces:
- A.The page that was loaded into memory first
- B.The page not used for the longest time period✓ Correct
- C.The largest page currently loaded in a frame
- D.The page with the lowest assigned page number
Explanation
LRU replaces the page that has not been referenced for the longest period of time, based on the assumption that pages used recently will be used again soon (temporal locality).
Report an error in this question
Memory ManagementMedium
Q18. The optimal page replacement algorithm (OPT) replaces:
- A.The page unused for longest future time✓ Correct
- B.The smallest page currently in a frame
- C.The least recently used page in memory
- D.The first page that was loaded in memory
Explanation
OPT replaces the page that will not be used for the longest period in the future. It produces the fewest page faults but is not implementable in practice since future references are unknown.
Report an error in this question
Memory ManagementHard
Q19. What is the working set model and how does it relate to thrashing?
- A.It is a disk scheduling model for I/O requests
- B.It is a CPU scheduling model for processes
- C.It models CPU utilization across all processors
- D.Defines active pages; fewer frames causes thrashing✓ Correct
Explanation
The working set model estimates the set of pages a process actively uses within a recent time window. If the system cannot allocate enough frames to hold a process's working set, that process will thrash.
Report an error in this question
Memory ManagementEasy
Q20. A page table stores:
- A.CPU register contents
- B.File names and paths
- C.Process priority values
- D.Page to frame mappings✓ Correct
Explanation
A page table maps each logical page number to the corresponding physical frame number in memory, enabling the translation of logical addresses to physical addresses.
Report an error in this question
Memory ManagementMedium
Q21. The best-fit memory allocation algorithm:
- A.Is the fastest allocation algorithm
- B.Allocates the first hole it finds
- C.Allocates the largest available hole
- D.Searches for the smallest sufficient hole✓ Correct
Explanation
Best-fit searches for the smallest hole that is large enough to satisfy the request. It produces the smallest leftover fragment but requires searching the entire list and can create many small unusable fragments.
Report an error in this question
Memory ManagementEasy
Q22. Main memory (RAM) is:
- A.Volatile storage the CPU accesses directly✓ Correct
- B.A backup device for storing archives
- C.Non-volatile persistent storage on disk
- D.A type of secondary storage for backup
Explanation
Main memory (RAM) is volatile storage directly accessible by the CPU. Programs must be loaded from secondary storage into main memory to be executed.
Report an error in this question
Memory ManagementHard
Q23. What is an inverted page table?
- A.A page table stored in reverse order
- B.One entry per physical frame, reducing overhead✓ Correct
- C.A page table stored entirely on the disk drive
- D.A table that maps physical to logical addresses
Explanation
An inverted page table has one entry per physical frame (not per virtual page). Each entry contains the process ID and virtual page mapped to that frame. It saves space but makes lookups slower without hashing.
Report an error in this question
Memory ManagementHard
Q24. What is the slab allocator used in Linux kernel memory management?
- A.A page replacement algorithm for virtual memory
- B.A disk allocation method for file storage
- C.A virtual memory technique for address mapping
- D.Pre-allocating object caches to reduce overhead✓ Correct
Explanation
The slab allocator creates caches of pre-allocated objects of specific sizes (e.g., PCBs, file descriptors). Objects are allocated from and returned to slabs, minimizing allocation/deallocation overhead and fragmentation.
Report an error in this question
Memory ManagementHard
Q25. What is the buddy system for memory allocation?
- A.A system with two separate pools for allocation
- B.A system where two processes share memory pool
- C.A system for backing up memory to the disk
- D.Power-of-2 blocks, splitting and coalescing buddies✓ Correct
Explanation
The buddy system allocates memory in blocks of 2^n. A block is split into two buddies (halves) to satisfy smaller requests. When both buddies are free, they are coalesced back into a larger block.
Report an error in this question
Memory ManagementHard
Q26. What is copy-on-write in the context of virtual memory?
- A.Copying all pages to disk during every write
- B.Writing data twice to provide data redundancy
- C.Sharing pages until a write, then making a copy✓ Correct
- D.Copying all pages before any read operation
Explanation
Copy-on-write allows parent and child processes to share the same pages after fork(). When either process modifies a page, the OS creates a private copy of that page, avoiding unnecessary duplication.
Report an error in this question
Memory ManagementHard
Q27. What are huge pages (large pages) and when are they beneficial?
- A.Pages that span across multiple physical disk drives
- B.Pages assigned the highest priority access level
- C.Pages used to store very large files on disk
- D.Larger pages reducing TLB misses for big workloads✓ Correct
Explanation
Huge pages use page sizes larger than standard (2MB or 1GB vs 4KB), reducing TLB misses and page table size. They benefit applications with large memory footprints like databases and scientific computing.
Report an error in this question
Memory ManagementHard
Q28. What is the page-fault frequency (PFF) approach to preventing thrashing?
- A.Setting a maximum number of page faults allowed
- B.Monitoring fault rate and adjusting frame allocation✓ Correct
- C.Counting total page faults across all processes
- D.Preventing all page faults from occurring ever
Explanation
PFF monitors each process's page-fault rate. If the rate exceeds an upper bound, more frames are allocated. If it falls below a lower bound, frames are removed. This directly controls thrashing.
Report an error in this question
Memory ManagementHard
Q29. What is the second-chance (clock) page replacement algorithm?
- A.Modified FIFO checking reference bit, gives second chance✓ Correct
- B.An algorithm that always replaces the second loaded page
- C.A two-pass algorithm scanning memory blocks twice each
- D.A modified version of the FIFO algorithm only
Explanation
The second-chance algorithm enhances FIFO by checking each page's reference bit. If set, the bit is cleared and the page is given another chance. If not set, the page is replaced. It approximates LRU.
Report an error in this question
Memory ManagementHard
Q30. What is memory-mapped I/O?
- A.Mapping device registers into address space✓ Correct
- B.A technique for allocating memory to tasks
- C.An I/O scheduling algorithm for requests
- D.Storing I/O data in regular memory buffers
Explanation
Memory-mapped I/O maps device registers or files into the virtual address space. Programs access them using standard load/store instructions instead of special I/O instructions, simplifying programming.
Report an error in this question