NEW
Font size
WorksheetsOSGs
Total questions: 52
Worksheet time: 16mins
What does the PC (Program Counter) store?
A. Current instruction
B. Address of the next instruction
C. Address of the last executed instruction
D. Value of the operand
What causes a page fault?
A. Division by zero
B. CPU overheating
C. Referencing a page not in memory
D. Stack overflow
What is the purpose of the backing store?
A. To permanently store user files
B. To hold system logs
C. To hold pages that are not in main memory
D. To back up BIOS
In virtual memory systems, what does "swapping" refer to?
A. Switching CPUs
B. Transferring processes between main memory and disk
C. Changing OS versions
D. Altering thread priorities
What is DMA used for in memory systems?
A. CPU process management
B. Fast data transfer without CPU intervention
C. Data compression
D. Instruction decoding
What happens if the OS restarts an instruction that was auto-incremented before a page fault?
A. Nothing is required
B. The register must be increased again
C. The OS must decrease the register before retrying
D. Instruction cannot be restarted
What is the unit of memory that the OS uses in paging?
A. Segment
B. Page
C. Block
D. Frame
Which of the following is a valid page replacement algorithm?
A. FIFO
B. LILO
C. FIT
D. CACHE
What is the primary function of a cache in a computer system?
C. To manage memory allocation
B. To speed up data access by storing frequently used data
D. To execute instructions
A. To store data permanently
Which of the following is a characteristic of a thrashing condition?
A. High CPU utilization
D. Low disk activity
B. Excessive page faults
C. Efficient memory usage
What does the term "fragmentation" refer to in memory management?
D. The size of the memory cache
C. The speed of memory access
B. The process of combining free memory blocks
A. Inefficient use of memory space
In terms of speed the best method of Dynamic Storage-Allocation is
A. First fit
B. Best fit
C. Worst fit
D. Next fit
Consider a swapping system in which the memory consists of the following hole sizes: 10K, 4K, 20K, 15K, 9K. Assume worst fit algorithm is used. Which holes are taken for successive segment requests of 8K, 12K, 10K?
Ai trả lời chọn đại sẽ bị chia điểm
A. 10K, 15K, 20K
B. 20K, 15K, 10K
C. 9K, 15K, 10K
D. 10K, 20K, 15K
A computer with a 32-bit address uses a two-level page table. Virtual addresses are split into a 9-bit top-level page table field, an 11-bit second-level page table field, and an offset. How large are the pages?
A. 2-KB page
B. 4-KB page
C. 1-KB page
D. 512B page
What limitation does the external pager face in the separation model?
A. It uses kernel space
B. It runs slower than hardware
C. It cannot directly access hardware bits like R and M
D. It replaces MMU
What is the role of the page table in a virtual memory system?
D. To handle input/output operations
A. To store the physical addresses of all processes
C. To manage CPU scheduling
B. To map virtual addresses to physical addresses
Which of the following best describes the term "thrashing" in a virtual memory context?
C. High CPU performance
D. Low memory fragmentation
B. Excessive swapping of pages in and out of memory
A. Efficient memory usage
What is the main advantage of using a multi-level page table?
C. It simplifies the memory management unit
B. It increases the speed of memory access
D. It eliminates page faults
A. It reduces the size of the page table
In a memory management system, what does the term "page replacement" refer to?
A. The process of moving data from disk to memory
D. The allocation of memory to processes
C. The technique of compressing memory data
B. The method of swapping out a page in memory for a new page
Which algorithm is commonly used to manage memory allocation in a system?
C. Shortest Job First
D. First Come First Serve
B. Least Recently Used (LRU)
A. Round Robin
What is the main disadvantage of using a single-level page table?
D. It increases the speed of memory access
C. It does not support virtual memory
B. It can lead to excessive memory usage
A. It is too complex to manage
3. What does the OS do before switching to a new process?
A. Deletes RAM contents
B. Flushes the TLB and sets MMU to new page table
C. Reboots the system
D. Clears the screen
6. In page fault handling, what does the OS do if the requested page is invalid?
A. Continues execution anyway
B. Loads a random page
C. Terminates the process or sends an error signal
D. Reboots the OS
When using a memory-mapped file, which of the following statements is true?
A. All writes to memory are immediately flushed to disk
B. File I/O is handled entirely by kernel buffer copies
C. The file contents are paged in on demand, not read in full immediately
D. The entire file must be loaded into RAM before access
In a two-handed clock cleaning policy, what is the role of the front hand?
A. To choose the victim page for eviction
B. To pin pages in memory
C. To schedule page table updates
D. To write dirty pages to disk and advance
7. What is the main benefit of separating policy and mechanism in paging?
A. Reduces CPU frequency
B. Makes page faults disappear
C. Allows easier modification and testing of memory policies
D. Avoids TLB flushing
What is the mathematical formula for overhead memory in paging (given s, e, p)?
A. se/p + p/2
B. s*p + e
C. s/e + p*2
D. se*p/2
5 Which strategy allows processes to share modifiable pages efficiently
A Static Linking
B Copy on Write
C Page Cleaning
D Thrashing
10. Why does the operating system preload some pages when a process starts?
A. To save disk space
B. To increase CPU response time
C. To reduce the chance of continuous page faults during startup
D. To avoid conflicts between processes
9. What is the role of the TLB (Translation Lookaside Buffer) in paging?
A. To store the entire RAM
B. To convert physical addresses into virtual addresses
C. To cache recent address translations for faster lookup
D. To choose which page to replace
What is the primary purpose of a page table in a virtual memory system?
A. To store the physical addresses of all memory pages
B. To map virtual addresses to physical addresses
C. To manage CPU scheduling
D. To keep track of disk space usage
In a demand paging system, what occurs when a page fault happens?
A. The process is terminated immediately
B. The required page is loaded from disk into memory
C. The CPU is reset
D. The operating system ignores the request
What is the effect of increasing the page size in a paging system?
A. It reduces internal fragmentation
B. It increases the number of page faults
C. It decreases the size of the page table
D. It has no effect on performance
What is the purpose of the page replacement algorithm in a virtual memory system?
C. To manage CPU scheduling
B. To increase the size of the page table
A. To determine which page to remove from memory
D. To optimize disk access speed
Which of the following best describes the term "working set" in the context of memory management?
C. The amount of memory reserved for future use
D. The memory space that is not currently in use
B. The set of pages that a process is currently using
A. The total memory allocated to a process
What is the main disadvantage of using a multi-level page table?
D. It does not support virtual memory
A. Increased complexity in memory management
B. Slower access times compared to single-level tables
C. Higher memory consumption
In a two-handed clock cleaning policy, what is the role of the front hand?
A. To choose the victim page for eviction
B. To pin pages in memory
C. To schedule page table updates
D. To write dirty pages to disk and advance
When a file is mapped into the process address space using a memory-mapped file, what happens to modified pages when the process exits?
A. They are discarded
B. They are immediately written to disk at each change
C. They are automatically written back to the file on exit
D. They are copied to swap space only
What is the purpose of the Translation Lookaside Buffer (TLB) in a virtual memory system?
B. To cache recent virtual-to-physical address translations
D. To track memory allocation for processes
A. To store the entire virtual memory
C. To manage page replacement algorithms
In a demand paging system, what happens when a page fault occurs?
C. The CPU is halted until the page is available
D. The page is swapped out immediately
B. The required page is loaded from disk into memory
A. The process is terminated
Which of the following best describes the term "working set" in the context of memory management?
A. The total amount of memory allocated to a process
B. The set of pages that a process is currently using
C. The pages that are swapped out to disk
D. The memory space reserved for system processes
A system has processes with an average size of 64 MB. Each page table entry takes 8 bytes. What is the optimal page size in KB?
A. 512 KB
B. 1 MB
C. 32 KB
D. 96 KB
What is the primary purpose of the Translation Lookaside Buffer (TLB) in a virtual memory system?
D. To increase the size of the page table
A. To store all virtual addresses
B. To cache recent translations of virtual addresses to physical addresses
C. To manage page replacement algorithms
In a virtual memory system, what does the term "page replacement" refer to?
A. The process of loading pages from disk into memory
D. The technique of compressing pages to save space
B. The method of swapping out pages in memory for new pages
C. The act of deleting pages from the page table
Which of the following is a consequence of having a smaller page size in a paging system?
C. Improved access speed
B. Decreased number of page faults
D. Reduced internal fragmentation
A. Increased page table size
What is the main function of a page replacement algorithm in a virtual memory system?
D. To allocate memory for new processes
C. To manage CPU scheduling
B. To increase the size of the page table
A. To determine which page to remove from memory
How does the Least Recently Used (LRU) algorithm decide which page to evict?
B. It evicts the page that is the largest
A. It evicts the page that has been used the least recently
C. It evicts the page that is the oldest
D. It evicts the page that is currently in use
What is the impact of page size on the performance of a virtual memory system?
D. Larger page sizes decrease the size of the page table
B. Smaller page sizes reduce the number of page faults
A. Larger page sizes can lead to increased internal fragmentation
C. Page size has no effect on performance
Which of the following is an advantage of using shared libraries
A Bigger executable files
B Duplicated code in memory
C Reduced memory usage and disk space
D Static linking required
Which of the following best describes the term "page fault" in a virtual memory system?
A. A process being terminated
D. A successful memory allocation
B. A request for a page that is not currently in memory
C. The process running out of memory
What is the primary function of the page replacement algorithm?
A. To increase the size of the page table
D. To optimize disk I/O operations
B. To determine which pages to swap out of memory
C. To manage CPU scheduling
What is the effect of increasing the page size in a virtual memory system?
A. It increases the number of page faults
B. It decreases the size of the page table
C. It can lead to higher internal fragmentation
D. It improves the speed of memory access
