Unit 5: Memory Management - Practice Quiz

CSE316 — Operating Systems 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 The address generated by the CPU is known as:

A. Memory Management Unit address
B. Logical address
C. Physical address
D. Post-relocation register address

2 The run-time mapping from virtual to physical addresses is done by a hardware device called the:

A. Memory Management Unit (MMU)
B. Loader
C. CPU Scheduler
D. Device Driver

3 In the context of memory management, what is the backing store?

A. The main memory (RAM)
B. The fast disk large enough to accommodate copies of all memory images for all users
C. The L1 Cache
D. The Registry

4 Which memory allocation policy allocates the smallest hole that is big enough to hold a process?

A. Best fit
B. Worst fit
C. First fit
D. Next fit

5 External fragmentation occurs when:

A. Allocated memory may be slightly larger than requested memory
B. Total memory space exists to satisfy a request, but it is not contiguous
C. A process is loaded into memory but never executed
D. Pages are not modified in memory

6 What is the solution to external fragmentation?

A. Swapping
B. Segmentation
C. Compaction
D. Paging

7 In paging, physical memory is broken into fixed-sized blocks called:

A. Frames
B. Segments
C. Pages
D. Sectors

8 If the page size is 4 KB (2^12), how many bits are required for the page offset?

A. 32 bits
B. 10 bits
C. 20 bits
D. 12 bits

9 What data structure is used to map logical pages to physical frames?

A. Process Control Block
B. Segment table
C. Page table
D. Frame table

10 Paging suffers from which type of fragmentation?

A. Both internal and external
B. Internal fragmentation
C. Neither
D. External fragmentation

11 The Translation Look-aside Buffer (TLB) is used to:

A. Speed up the translation of logical addresses to physical addresses
B. Perform segmentation
C. Store the entire page table
D. Handle page faults

12 In segmentation, the logical address consists of:

A. Base and Limit
B. Segment number and offset
C. Page number and offset
D. Frame number and offset

13 Which register is used in segmentation to store the starting physical address of a segment?

A. Limit register
B. Index register
C. Base register
D. Instruction register

14 What technique allows a process to be larger than the physical memory allocated to it?

A. Segmentation
B. Overlays
C. Contiguous allocation
D. Virtual Memory

15 Overlays are used when:

A. The process is larger than the amount of memory allocated to it
B. The process is smaller than physical memory
C. Paging is disabled
D. The OS supports virtual memory

16 In demand paging, a page is brought into memory only when:

A. The process starts
B. It is needed/referenced during execution
C. It is modified
D. The time quantum expires

17 What happens when a process tries to access a page that is not currently in memory?

A. Deadlock
B. System crash
C. Segmentation fault
D. Page fault

18 Which bit in the page table indicates whether a page is in memory or on the disk?

A. Dirty bit
B. Reference bit
C. Protection bit
D. Valid-invalid bit

19 What is the main advantage of multi-level paging?

A. Reducing the size of the page table in memory
B. Simpler hardware implementation
C. Faster memory access
D. Elimination of internal fragmentation

20 In the context of page replacement, Belady's Anomaly states that:

A. Optimal replacement is impossible to implement
B. For some algorithms, the page-fault rate may increase as the number of allocated frames increases
C. Thrashing occurs when CPU utilization is low
D. LRU is always better than FIFO

21 Which page replacement algorithm has the lowest possible page-fault rate for a fixed number of frames?

A. LRU
B. Counting-based
C. FIFO
D. Optimal

22 Which page replacement algorithm replaces the page that has not been used for the longest period of time?

A. MFU (Most Frequently Used)
B. LRU (Least Recently Used)
C. Optimal
D. FIFO

23 What is 'Thrashing' in an operating system?

A. When the hard disk is full
B. A process spending more time paging than executing
C. A high rate of I/O operations
D. A deadlock situation

24 The 'Working Set Model' is used to prevent:

A. Deadlocks
B. fragmentation
C. Thrashing
D. Page faults

25 In Segmentation with Paging:

A. The segment is divided into pages
B. The page is divided into segments
C. There are no page tables
D. External fragmentation is high

26 Which bit is used to indicate if a page has been modified while in memory?

A. Valid bit
B. Dirty (or Modify) bit
C. Reference bit
D. Present bit

27 Pure demand paging implies:

A. Loading all pages before execution
B. Never swapping pages out
C. Using segmentation only
D. Starting a process with no pages in memory

28 The effective access time in a paged memory system depends heavily on:

A. The number of processes
B. The Page Fault Rate
C. The clock speed
D. The size of the hard disk

29 Which allocation algorithm allocates the first hole that is big enough?

A. Best fit
B. First fit
C. Worst fit
D. Quick fit

30 Logical address space is seen by:

A. The User / Program
B. The RAM
C. The Memory Management Unit
D. The Bus

31 The limit register in segmentation is used to:

A. Store the starting address
B. Point to the segment table
C. Count the number of segments
D. Specify the length of the segment

32 If a page fault occurs and there are no free frames, what must the OS do?

A. Ignore the instruction
B. Execute a page replacement algorithm
C. Increase the page size
D. Terminate the process

33 Which of the following is a disadvantage of the FIFO page replacement algorithm?

A. It is hard to implement
B. It requires hardware support
C. It uses a stack
D. It suffers from Belady's Anomaly

34 Copy-on-Write (COW) allows parent and child processes to initially share the same:

A. Segments
B. Pages
C. Stack
D. File descriptors

35 The Second Chance (or Clock) algorithm is an approximation of:

A. LRU
B. FIFO
C. MRU
D. Optimal

36 Locality of reference refers to:

A. Global variables only
B. The physical location of memory sticks
C. The tendency of a program to access the same set of memory locations frequently over a short period
D. The distance between the CPU and RAM

37 Which scheme allows the user to view memory as a collection of variable-sized logical units?

A. Segmentation
B. Hashing
C. Contiguous Allocation
D. Paging

38 In a system using paging, if the logical address is 32 bits and the page size is 4KB (2^12 bytes), what is the size of the page number?

A. 12 bits
B. 32 bits
C. 10 bits
D. 20 bits

39 Internal fragmentation is NOT possible in:

A. Segmentation
B. Demand Paging
C. Fixed Partitioning
D. Paging

40 What is the purpose of the 'fence register' in early memory management?

A. To prevent a user program from modifying the OS part of memory
B. To count pages
C. To clock the CPU
D. To store the stack pointer

41 In inverted page tables:

A. It increases memory usage significantly
B. The table is stored on the disk
C. There is one entry for each real physical frame
D. There is one entry for each logical page

42 Which allocation strategy creates the largest leftover hole?

A. Best fit
B. First fit
C. Next fit
D. Worst fit

43 Swapping requires the backing store to be:

A. Tape storage
B. Large and fast
C. Accessible only by the kernel
D. Volatile

44 A 'Global' page replacement policy allows:

A. Pages to be shared globally
B. The OS to replace the kernel
C. A process to select a replacement frame from the set of all frames in the system
D. A process to only replace its own frames

45 If the TLB hit ratio is high, the effective memory access time is:

A. Halved
B. Close to the memory access time
C. Doubled
D. Tripled

46 Pre-paging is a technique used to:

A. Avoid the large number of initial page faults
B. Encrypt pages
C. Clear memory before use
D. Compress pages

47 Which fragmentation is solved by 'Compaction'?

A. External
B. Virtual
C. Logical
D. Internal

48 The mapping of a logical address to a physical address is done at 'Load Time' if:

A. Memory location is not known until execution
B. The process can be moved during execution
C. We know where the process will reside in memory at compile time
D. Virtual memory is used

49 In a Multi-level paging scheme with a two-level page table, the logical address is divided into:

A. Page number, offset
B. Row, Column
C. Outer page table index, Inner page table index, offset
D. Segment, offset

50 Counting based page replacement algorithms include:

A. Optimal and Second Chance
B. Round Robin
C. LFU and MFU
D. FIFO and LRU