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. Physical address
C. Post-relocation register address
D. Logical address

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

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

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

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

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

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

5 External fragmentation occurs when:

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

6 What is the solution to external fragmentation?

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

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

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

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

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

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

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

10 Paging suffers from which type of fragmentation?

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

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

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

12 In segmentation, the logical address consists of:

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

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

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

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

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

15 Overlays are used when:

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

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

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

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

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

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

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

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

A. Simpler hardware implementation
B. Faster memory access
C. Reducing the size of the page table in memory
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. LRU is always better than FIFO
D. Thrashing occurs when CPU utilization is low

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

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

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

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

23 What is 'Thrashing' in an operating system?

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

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

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

25 In Segmentation with Paging:

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

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

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

27 Pure demand paging implies:

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

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

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

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

A. First fit
B. Best 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. Specify the length of the segment
C. Count the number of segments
D. Point to the segment table

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

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

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

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

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

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

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

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

36 Locality of reference refers to:

A. The distance between the CPU and RAM
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. Global variables only

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

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

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. 32 bits
B. 12 bits
C. 10 bits
D. 20 bits

39 Internal fragmentation is NOT possible in:

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

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

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

41 In inverted page tables:

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

42 Which allocation strategy creates the largest leftover hole?

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

43 Swapping requires the backing store to be:

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

44 A 'Global' page replacement policy allows:

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

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

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

46 Pre-paging is a technique used to:

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

47 Which fragmentation is solved by 'Compaction'?

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

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

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

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. Segment, offset
D. Outer page table index, Inner page table index, offset

50 Counting based page replacement algorithms include:

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