Unit 5 - Practice Quiz

CSE316

1 What is the specific name given to the set of all logical addresses generated by a program?

A. Physical address space
B. Logical address space
C. Disk address space
D. Relocation register space

2 Which hardware device is responsible for mapping virtual addresses to physical addresses at run time?

A. CPU
B. MMU (Memory Management Unit)
C. TLB (Translation Lookaside Buffer)
D. Cache Memory

3 In the context of swapping, what is the role of the backing store?

A. It acts as the primary cache for the CPU.
B. It is a fast disk large enough to accommodate copies of all memory images for all users.
C. It stores the page table base registers.
D. It is a read-only memory section for the kernel.

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

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

5 What type of fragmentation occurs when there is enough total memory space to satisfy a request, but the available spaces are not contiguous?

A. Internal fragmentation
B. External fragmentation
C. Page fault
D. Segmentation fault

6 Which technique can be used to solve the problem of external fragmentation by shuffling memory contents to place all free memory together in one large block?

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

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

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

8 If the size of a logical address space is and a page size is bytes, then the high-order bits of a logical address designate the:

A. Page offset
B. Frame number
C. Page number
D. Segment limit

9 What is the primary function of the Translation Lookaside Buffer (TLB)?

A. To store the entire page table in the CPU cache.
B. To reduce the effective memory access time by caching page table entries.
C. To handle page faults.
D. To perform segmentation calculations.

10 What type of fragmentation is commonly associated with Paging?

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

11 In segmentation, a logical address consists of:

A. Page number, Page offset
B. Segment number, Segment offset
C. Frame number, Frame offset
D. Base address, Limit register

12 Which hardware register in segmentation contains the value of the smallest legal physical memory address for a segment?

A. Limit register
B. Base register
C. Relocation register
D. Page-table base register

13 In segmentation, what happens if the offset is greater than the value in the limit register?

A. A page fault occurs.
B. The OS allocates more memory.
C. A trap (addressing error) is generated.
D. The offset wraps around to 0.

14 Which of the following is a technique where a process can be larger than the physical memory allocated to it?

A. Contiguous Allocation
B. Overlays
C. Virtual Memory
D. Swapping

15 What is Demand Paging?

A. Loading all pages of a process before execution starts.
B. Loading a page into memory only when it is needed.
C. Swapping the entire process out to the disk.
D. Requesting pages from the kernel manually.

16 A Page Fault occurs when:

A. A process tries to access a page that is not currently in memory.
B. A process tries to access a protected memory area.
C. The TLB is full.
D. The page table is corrupted.

17 What is Belady's Anomaly?

A. Effective access time increases as the TLB hit ratio increases.
B. For some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases.
C. The CPU utilization decreases as the degree of multiprogramming increases.
D. Internal fragmentation increases as page size decreases.

18 Which page replacement algorithm suffers from Belady's Anomaly?

A. LRU (Least Recently Used)
B. Optimal Replacement
C. FIFO (First-In, First-Out)
D. Stack Algorithms

19 The Optimal Page Replacement algorithm replaces the page that:

A. Was brought in last.
B. Has been used least recently.
C. Will not be used for the longest period of time.
D. Has been used most frequently.

20 The LRU (Least Recently Used) page replacement algorithm is based on the assumption that:

A. Pages used recently will likely be used again soon.
B. Pages brought in first are the least needed.
C. Pages used frequently should be replaced.
D. Future access patterns are random.

21 What is the concept of Thrashing?

A. A condition where the CPU is idle because processes are busy swapping pages in and out.
B. A security breach in the paging system.
C. The process of compacting memory.
D. Rapid execution of short processes.

22 The Working Set Model is used to:

A. Calculate the size of the Page Table.
B. Prevent Thrashing by estimating the frame requirements of a process.
C. Determine the optimal page size.
D. Manage disk scheduling.

23 In a Multi-level Paging scheme, the page table itself is:

A. Stored in the TLB.
B. Paged.
C. Segmented.
D. Compressed.

24 What is the main advantage of Overlays?

A. It eliminates internal fragmentation.
B. It allows a process to be larger than the amount of memory allocated to it.
C. It speeds up disk I/O.
D. It simplifies the Operating System code.

25 Which bit in a page table entry indicates whether a page has been written to since it was loaded into memory?

A. Valid/Invalid bit
B. Dirty (Modify) bit
C. Reference bit
D. Protection bit

26 If the Page Table Base Register (PTBR) contains the base address of the page table, and the page number is , the entry for page is found at:

A.
B.
C.
D.

27 In Segmentation with Paging, how is memory managed?

A. Segments are variable sized, and pages are fixed size.
B. The logical address space is segmented, and the segments are paged.
C. Pages are segmented into frames.
D. Memory is treated as a flat file.

28 Calculate the effective access time (EAT) if the memory access time is 100ns, the TLB access time is 20ns, and the TLB hit ratio is 80%. (Assume no page faults).

A. 120 ns
B. 140 ns
C. 132 ns
D. 100 ns

29 What is the purpose of the Valid-Invalid bit in a page table?

A. To lock the page in memory.
B. To indicate if the page is read-only.
C. To indicate if the page is in the process's logical address space and currently in memory.
D. To count the number of accesses.

30 Which of the following creates a separation between user logical memory and physical memory?

A. Direct Memory Access (DMA)
B. Virtual Memory
C. Cache Coherence
D. Instruction Pipelining

31 In the context of the Second-Chance (Clock) page replacement algorithm, what is the role of the Reference bit?

A. It marks the page as dirty.
B. It gives a page a 'second chance' to stay in memory if it was recently used.
C. It indicates the page is invalid.
D. It is used to calculate the physical address.

32 What happens in a system using Pure Demand Paging when a process first starts?

A. All pages are loaded immediately.
B. The OS crashes.
C. Execution starts with no pages in memory, causing immediate page faults.
D. The process waits for the swapper.

33 The 50% rule in memory allocation states that:

A. 50% of memory is wasted by internal fragmentation.
B. Given allocated blocks, another blocks will be lost to external fragmentation.
C. Page tables take up 50% of memory.
D. The OS occupies 50% of RAM.

34 When does Internal Fragmentation become zero?

A. When using First-fit.
B. When using Variable Partitioning.
C. When using Paging.
D. When using Fixed Partitioning.

35 Which structure helps in solving the problem of large page tables in a 64-bit address space by using a hash of the virtual page number?

A. Hierarchical Page Table
B. Inverted Page Table
C. Hashed Page Table
D. TLB

36 What is the primary feature of an Inverted Page Table?

A. It has one entry for each virtual page of the process.
B. It has one entry for each real physical frame of memory.
C. It is stored on the disk.
D. It uses segmentation.

37 Which of the following statements about Swapping is true?

A. Swapping is very fast and has no performance overhead.
B. The context switch time in swapping is dominated by the transfer time of the backing store.
C. Swapping can only be done between RAM and Cache.
D. Swapping eliminates the need for virtual memory.

38 In the context of the MFU (Most Frequently Used) page replacement algorithm, the argument is that:

A. The page with the smallest count was just brought in and has yet to be used.
B. The page with the largest count was just brought in.
C. Old pages are better.
D. Random pages should be removed.

39 Logical address is also known as:

A. Physical Address
B. Real Address
C. Virtual Address
D. Hard Address

40 If a system has a 32-bit logical address and a 4 KB page size, how many entries are in a single-level page table?

A.
B.
C.
D.

41 Which memory management scheme allows the user to view memory as a collection of variable-sized logic units (e.g., main, stack, symbol table)?

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

42 In a Paged Segmentation system (like MULTICS), the external fragmentation is eliminated by:

A. Paging the segments.
B. Making segments fixed size.
C. Using a single large segment.
D. Using Compaction.

43 What is the frame table?

A. A table mapping logical pages to frames for a specific process.
B. A system-wide data structure detailing which frames are free and which are allocated.
C. A table stored in the L1 Cache.
D. A list of all segments.

44 Which of the following creates a 'hole' in memory during contiguous allocation?

A. Process termination
B. Process creation
C. Context switching
D. Interrupt handling

45 The time required to service a page fault includes:

A. Only the disk read time.
B. Service the page-fault interrupt, Read in the page, Restart the process.
C. Only the process restart time.
D. Context switch time only.

46 What is Global Replacement in page replacement algorithms?

A. A process selects a replacement frame from the set of all frames in the system.
B. A process selects a replacement frame only from its own set of allocated frames.
C. Replacing all pages in memory at once.
D. Replacing pages based on global time.

47 Which of the following is NOT a benefit of Virtual Memory?

A. More programs can run concurrently.
B. Less I/O is needed to load or swap programs.
C. CPU utilization is increased.
D. It eliminates the need for a hard disk.

48 In Two-Level Paging, the logical address is divided into:

A. Page number, Page offset
B. Outer page number, Inner page number, Page offset
C. Segment number, Block number
D. Frame number, Displacement

49 Reentrant code (pure code) in paging allows:

A. Self-modifying code.
B. Sharing of common code among processes.
C. Writing to the code segment.
D. Dynamic linking.

50 Which algorithm requires a counter or stack to track the age of pages?

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