Unit 5 - Practice Quiz

CSE316 52 Questions
0 Correct 0 Wrong 52 Left
0/52

1 An address generated by the CPU is commonly referred to as a(n) __.

Logical & Physical Address Space Easy
A. Port Address
B. MAC Address
C. Logical Address
D. Physical Address

2 The hardware device that translates a virtual address to a physical address is the __.

Logical & Physical Address Space Easy
A. MMU (Memory Management Unit)
B. ALU (Arithmetic Logic Unit)
C. System Bus
D. CPU (Central Processing Unit)

3 The process of moving a process from main memory to a secondary storage disk is known as __.

Swapping Easy
A. Swapping in
B. Paging
C. Segmentation
D. Swapping out

4 In which contiguous memory allocation strategy does the OS place a process in the first available memory block that is large enough?

Contiguous Memory allocation Easy
A. Best-fit
B. First-fit
C. Next-fit
D. Worst-fit

5 What type of fragmentation occurs when the total available memory space exists to satisfy a request, but it is not contiguous?

Fragmentation - internal and external Easy
A. Internal Fragmentation
B. System Fragmentation
C. Data Fragmentation
D. External Fragmentation

6 Internal fragmentation is most likely to occur in which memory management scheme?

Fragmentation - internal and external Easy
A. Dynamic Partitioning
B. Segmentation
C. Paging
D. Swapping

7 In a paging scheme, the logical address space is divided into fixed-size blocks called __.

Paging Easy
A. Frames
B. Segments
C. Pages
D. Partitions

8 In a paging scheme, the physical memory is divided into fixed-size blocks called __.

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

9 What is the primary benefit of using virtual memory?

Virtual memory concept Easy
A. It eliminates the need for main memory.
B. It makes the secondary storage faster.
C. It allows the logical address space of a process to be larger than the physical memory.
D. It increases the speed of the CPU.

10 The technique of loading a page into memory only when it is needed is known as __.

Demand paging Easy
A. Swapping
B. Segmentation
C. Pre-paging
D. Demand Paging

11 An event that occurs when a program tries to access a page that is not currently in main memory is called a(n) __.

Page interrupt fault Easy
A. Page Fault
B. Segmentation Fault
C. Bus Error
D. System Call

12 Which page replacement algorithm replaces the page that has been in memory for the longest duration?

Page replacement algorithms Easy
A. Most Recently Used (MRU)
B. Optimal Page Replacement
C. Least Recently Used (LRU)
D. First-In, First-Out (FIFO)

13 The principle of "replace the page that has not been used for the longest period of time" is the basis for which algorithm?

Page replacement algorithms Easy
A. First-In, First-Out (FIFO)
B. Optimal Page Replacement
C. Random Replacement
D. Least Recently Used (LRU)

14 In segmentation, the logical address space is a collection of __.

Segmentation Easy
A. Fixed-size pages
B. Fixed-size frames
C. Uniform blocks
D. Variable-size segments

15 A logical address in a segmentation scheme consists of two parts: __.

Segmentation Easy
A. Segment number and offset
B. Base address and limit
C. Page number and offset
D. Frame number and offset

16 What was an early technique, managed by the programmer, to run a program larger than physical memory by manually swapping pieces of the program?

Overlays - swapping Easy
A. Multitasking
B. Paging
C. Overlays
D. Virtual Memory

17 Which memory allocation policy tends to create the largest possible leftover hole in memory after allocation?

Contiguous Memory allocation Easy
A. Best-fit
B. First-fit
C. Worst-fit
D. Buddy system

18 What is the primary reason for using multi-level paging?

Schemes - Paging - simple and multi level Easy
A. To simplify the hardware design
B. To increase the speed of memory access
C. To reduce the size of the page table
D. To eliminate external fragmentation

19 In the context of swapping, the secondary memory space is referred to as the __.

Swapping Easy
A. Cache
B. ROM
C. Backing Store
D. Main Memory

20 Combining segmentation with paging allows for __.

Segmentation - simple, multi-level and with paging Easy
A. Faster CPU execution speeds
B. The use of only one segment per process
C. The logical benefits of segmentation with the physical memory management of paging
D. The elimination of page tables entirely

21 A system uses segmentation. The segment table for a process is given below:

| Segment | Base | Limit |
|---------|--------|-------|
| 0 | 219 | 600 |
| 1 | 2300 | 14 |
| 2 | 90 | 100 |
| 3 | 1327 | 580 |
| 4 | 1952 | 96 |

What is the physical address for the logical address (2, 95)?

Logical & Physical Address Space Medium
A. 185
B. 95
C. 195
D. Memory access violation (trap)

22 In a paged memory system, the logical address is 32 bits, and the page size is 4 KB. How many bits are used for the page number and the page offset, respectively?

Paging Medium
A. 12 bits for page number, 20 bits for offset
B. 16 bits for page number, 16 bits for offset
C. 22 bits for page number, 10 bits for offset
D. 20 bits for page number, 12 bits for offset

23 Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in that order), which partition would the Best-Fit algorithm allocate for a process requiring 290K of memory?

Contiguous Memory allocation Medium
A. 200K
B. 600K
C. 500K
D. 300K

24 A system uses fixed-size partitioning with each partition being 128 KB. If three processes of sizes 100 KB, 64 KB, and 120 KB are loaded into three separate partitions, what is the total amount of internal fragmentation?

Fragmentation - internal and external Medium
A. 100 KB
B. 32 KB
C. 0 KB
D. 92 KB

25 A system has a memory access time of 100 nanoseconds. The time to service a page fault is 25 milliseconds. If the effective access time must be kept below 200 nanoseconds, what is the maximum tolerable page fault rate ()?

Demand paging Medium
A. 0.004
B. 0.0004
C. 0.00004
D. 0.000004

26 Consider the page reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 for a memory with 3 frames. How many page faults would occur using the Least Recently Used (LRU) algorithm?

Page replacement algorithms Medium
A. 8
B. 10
C. 9
D. 7

27 A system has a 32-bit virtual address space, a page size of 4 KB, and page table entries are 4 bytes each. What is the minimum number of levels required for the page table if each level's page table must fit within a single page frame?

Schemes - Paging - simple and multi level Medium
A. 4
B. 1
C. 2
D. 3

28 A process of size 2 MB needs to be swapped out. The backing store has an average latency of 5 ms and a transfer rate of 10 MB/s. How much time will it take to complete the swap-out operation?

Swapping Medium
A. 200 ms
B. 250 ms
C. 205 ms
D. 5.2 ms

29 Belady's Anomaly, where increasing the number of allocated frames leads to an increase in page faults, can occur in which of the following page replacement algorithms?

Page replacement algorithms Medium
A. First-In, First-Out (FIFO)
B. Optimal (OPT)
C. Both LRU and FIFO
D. Least Recently Used (LRU)

30 What is the primary advantage of using a combined Segmentation with Paging scheme over using pure Segmentation?

Segmentation - simple, multi-level and with paging Medium
A. It simplifies the hardware design of the MMU.
B. It eliminates the need for a segment table.
C. It reduces the total number of page faults.
D. It eliminates external fragmentation by paging the segments.

31 Which of the following is the most accurate sequence of events that occurs when a page fault happens?

Page interrupt fault Medium
A. 1. Trap to OS, 2. Find page on disk, 3. Find a free frame, 4. Load page into frame, 5. Update page table, 6. Resume process.
B. 1. Trap to OS, 2. Update page table, 3. Find a free frame, 4. Find page on disk, 5. Load page into frame, 6. Resume process.
C. 1. Resume process, 2. Trap to OS, 3. Find page on disk, 4. Find a free frame, 5. Load page into frame, 6. Update page table.
D. 1. Find page on disk, 2. Find a free frame, 3. Trap to OS, 4. Load page into frame, 5. Update page table, 6. Resume process.

32 The concept of virtual memory is implemented by leveraging which hardware and software mechanism?

Virtual memory concept Medium
A. Demand Paging
B. Swapping of entire processes
C. Direct Memory Access (DMA)
D. Cache Memory

33 What is the key difference between the older technique of using overlays and the modern concept of virtual memory?

Overlays - swapping Medium
A. Overlays require manual management by the programmer, while virtual memory is managed automatically by the OS.
B. Overlays are faster because they don't involve the operating system.
C. Virtual memory is for multiprogramming, while overlays were for single-tasking systems.
D. Overlays use the hard disk, while virtual memory uses RAM exclusively.

34 A memory management system uses pure segmentation. Which type of fragmentation is it most susceptible to, and why?

Fragmentation - internal and external Medium
A. Both internal and external fragmentation equally.
B. Internal fragmentation, because segments must be a multiple of a fixed block size.
C. Neither, as segmentation is designed to eliminate fragmentation.
D. External fragmentation, because segments are of variable sizes.

35 A process has a logical address of 3085. If the system uses a page size of 1024 bytes, what is the corresponding page number and offset?

Paging Medium
A. Page number = 3, Offset = 13
B. Page number = 2, Offset = 1024
C. Page number = 2, Offset = 1037
D. Page number = 3, Offset = 1024

36 In a demand-paged system, what is the primary purpose of the 'dirty bit' (or modify bit) in a page table entry?

Demand paging Medium
A. To avoid writing an unmodified page to the disk during page-out.
B. To track how frequently a page has been accessed.
C. To signal a page fault to the operating system.
D. To indicate that the page is currently loaded in memory.

37 Why is the Optimal (OPT) page replacement algorithm not practically implementable in a general-purpose operating system?

Page replacement algorithms Medium
A. It has a very high computational overhead compared to LRU.
B. It suffers from Belady's Anomaly.
C. It causes an excessive number of page faults.
D. It requires future knowledge of the process's page reference string.

38 What is the primary advantage of an inverted page table structure compared to traditional multi-level page tables?

Schemes - Paging - simple and multi level Medium
A. It simplifies the implementation of page sharing between processes.
B. It eliminates internal fragmentation completely.
C. Address translation is faster because it involves fewer memory lookups.
D. The table size is proportional to the size of physical memory, not logical memory.

39 How does segmentation facilitate memory protection in a more effective way than a simple base-limit register pair for the entire process?

Segmentation Medium
A. It allows for different protection rights (read/write/execute) for each logical segment.
B. It completely prevents internal fragmentation.
C. It reduces the context switch time between processes.
D. It ensures that all allocated memory is contiguous.

40 If a page fault occurs and all memory frames are already occupied, what critical step must the operating system's page-fault handler perform before it can load the required page from disk?

Page interrupt fault Medium
A. Execute a page replacement algorithm to select a victim frame.
B. Compact memory to create a large enough free block.
C. Send a signal to the CPU to halt all other processes.
D. Terminate the faulting process to free up memory.

41 A system with 4 page frames uses the Optimal page replacement algorithm. It experiences 8 page faults for the reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2. If the same reference string is processed by the same system but using the Least Recently Used (LRU) algorithm, what is the absolute difference in the number of page faults between the two algorithms?

Page replacement algorithms Hard
A. 0
B. 2
C. 1
D. 3

42 A system has a 64-bit logical address space, a page size of 16 KB ( bytes), and page table entries (PTEs) are 8 bytes each. For a process to be able to use its entire logical address space, what is the minimum number of levels required for the page table, and what is the total size of all page tables for that process, assuming the outer page table must fit in a single page frame?

Schemes - Paging - simple and multi level Hard
A. 5 levels, approximately 256 PB
B. 4 levels, approximately 128 TB
C. 4 levels, approximately 256 TB
D. 5 levels, approximately 512 TB

43 A system uses a Working Set page replacement algorithm with a window size . Given the memory reference string 2, 6, 5, 1, 6, 4, 6, 2, 1, 4, 3, 5, 2 and assuming the process starts with an empty working set, how many page faults occur? A page fault happens only when a referenced page is not in the current working set.

Page replacement algorithms Hard
A. 8
B. 10
C. 7
D. 9

44 A system has a 60-bit logical address space, a page size of 16 KB ( bytes), and page table entries (PTEs) are 8 bytes each. Paging is multi-level, where each level's table must fit in a single page frame. What is the minimum number of levels required, and what is the approximate size of the final-level page tables for a process spanning the entire address space?

Schemes - Paging - simple and multi level Hard
A. 5 levels, 512 TB
B. 5 levels, 256 TB
C. 4 levels, 256 GB
D. 4 levels, 128 TB

45 A system with a single-level page table, a TLB, and demand paging has the following performance characteristics:
- TLB lookup time: 5 ns
- Memory access time: 100 ns
- TLB hit ratio: 95%
- Page fault rate: 0.01%
- Time to service a page fault: 20 ms
- Probability that a replaced page is dirty: 60%
An additional 20 ms is required to write back a dirty page. What is the Effective Memory Access Time (EMAT)?

Demand paging Hard
A. 3215 ns
B. 109.75 ns
C. 110.2 ns
D. 4415 ns

46 A system uses dynamic partitioning with the Best-Fit algorithm. The memory state is a list of free blocks: {150K, 400K, 250K, 600K, 300K}. A sequence of requests arrives: P1(210K), P2(350K), P3(120K). Then, process P1 terminates, and its memory is freed and merged with adjacent free blocks if possible. Finally, a new request P4(450K) arrives. What is the size of the largest free block after this sequence of operations?

Fragmentation - internal and external Hard
A. 450K
B. 490K
C. 600K
D. 540K

47 A system uses segmented paging. The logical address is 32 bits, with the top 4 bits for the segment number, the next 12 bits for the page number, and the final 16 bits for the offset. The segment table for a process has this entry for segment 2: {Base: 0x8000, Length: 0x5000 pages}. The page table for the first page of segment 2 (i.e., page table for segment 2, page numbers 0x000 to 0xFFF) is located at physical address 0xA1B00000. Each PTE is 4 bytes. What is the physical address for the logical address 0x2005C1234?

Segmentation - simple, multi-level and with paging Hard
A. The physical address cannot be determined from the information given.
B. 0xA1B0E0D0
C. 0xA1B5C234
D. This address causes a segmentation fault (addressing error).

48 Which of the following reference strings, when processed by a system with an increasing number of frames from 3 to 4, will demonstrate Belady's Anomaly for the FIFO page replacement algorithm?

Page replacement algorithms Hard
A. 0, 1, 2, 3, 0, 1, 4, 0, 1, 2, 3, 4
B. 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2
C. 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2
D. 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5

49 In a paged virtual memory system, a process has its page table stored in main memory. A particular memory instruction needs to read one word from a virtual address. The system uses a TLB with a 90% hit rate. A TLB lookup takes 10ns. A main memory access takes 90ns. A page fault occurs for 1 in every 5,000 memory references. The time to service a page fault is 10ms. What is the effective access time for this single word read, considering all these factors?

Virtual memory concept Hard
A. 2109 ns
B. 2099 ns
C. 190 ns
D. 100 ns

50 A system uses pure swapping for memory management. The main memory has a single contiguous space for user processes of 2 MB. The backing store is a disk with an average seek time of 5 ms, a rotational latency of 3 ms, and a transfer rate of 50 MB/s. A context switch takes 0.1 ms (excluding swap time). If the system runs a series of 1 MB processes, and each process runs for a 20 ms time quantum before being swapped out for the next, what is the system's efficiency (percentage of time spent on useful computation)?

Swapping Hard
A. 20.5%
B. 45.1%
C. 52.6%
D. 35.3%

51 A system has a 32-bit logical address space, a physical address space of 16 MB, and a page size of 4 KB. An inverted page table is used to manage memory. Each entry in the inverted page table consists of a 20-bit virtual page number, a 4-bit process ID, and 8 bits for control (valid, dirty, etc.). What percentage of physical memory is dedicated solely to storing the inverted page table?

Logical & Physical Address Space Hard
A. 2.0%
B. 0.1%
C. 1.25%
D. 0.5%

52 A system using dynamic memory allocation has free memory blocks of sizes {100K, 220K, 80K, 350K, 500K} in that physical order. A sequence of requests arrives: P1(75K), P2(250K), P3(210K). Then, P1 and P3 terminate. The system coalesces free blocks. Finally, P4(300K) arrives. If the system uses the Worst-Fit allocation strategy, what is the size of the largest remaining free block after P4 is allocated?

Contiguous Memory allocation Hard
A. 395K
B. 200K
C. 500K
D. 220K