wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

OSGs

Total questions: 52

Worksheet time: 16mins

Name
Class
Date
1.

What does the PC (Program Counter) store?

a)

A. Current instruction

b)

B. Address of the next instruction

c)

C. Address of the last executed instruction

d)

D. Value of the operand

2.

What causes a page fault?

a)

A. Division by zero

b)

B. CPU overheating

c)

C. Referencing a page not in memory

d)

D. Stack overflow

3.

What is the purpose of the backing store?

a)

A. To permanently store user files

b)

B. To hold system logs

c)

C. To hold pages that are not in main memory

d)


D. To back up BIOS

4.

In virtual memory systems, what does "swapping" refer to?

a)

A. Switching CPUs

b)

B. Transferring processes between main memory and disk

c)


C. Changing OS versions

d)

D. Altering thread priorities

5.

What is DMA used for in memory systems?

a)

A. CPU process management

b)

B. Fast data transfer without CPU intervention

c)

C. Data compression

d)

D. Instruction decoding

6.

What happens if the OS restarts an instruction that was auto-incremented before a page fault?

a)

A. Nothing is required

b)

B. The register must be increased again

c)

C. The OS must decrease the register before retrying

d)

D. Instruction cannot be restarted

7.

What is the unit of memory that the OS uses in paging?

a)

A. Segment

b)

B. Page

c)

C. Block

d)

D. Frame

8.

Which of the following is a valid page replacement algorithm?

a)

A. FIFO

b)

B. LILO

c)

C. FIT

d)

D. CACHE

9.

What is the primary function of a cache in a computer system?

a)

C. To manage memory allocation

b)

B. To speed up data access by storing frequently used data

c)

D. To execute instructions

d)

A. To store data permanently

10.

Which of the following is a characteristic of a thrashing condition?

a)

A. High CPU utilization

b)

D. Low disk activity

c)

B. Excessive page faults

d)

C. Efficient memory usage

11.

What does the term "fragmentation" refer to in memory management?

a)

D. The size of the memory cache

b)

C. The speed of memory access

c)

B. The process of combining free memory blocks

d)

A. Inefficient use of memory space

12.

In terms of speed the best method of Dynamic Storage-Allocation is

a)

A. First fit

b)

B. Best fit

c)

C. Worst fit

d)

D. Next fit

13.

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)

A. 10K, 15K, 20K

b)

B. 20K, 15K, 10K

c)

C. 9K, 15K, 10K

d)

D. 10K, 20K, 15K

14.

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)

A. 2-KB page

b)

B. 4-KB page

c)

C. 1-KB page

d)

D. 512B page

15.

What limitation does the external pager face in the separation model?

a)

A. It uses kernel space

b)

B. It runs slower than hardware

c)

C. It cannot directly access hardware bits like R and M

d)

D. It replaces MMU

16.

What is the role of the page table in a virtual memory system?

a)

D. To handle input/output operations

b)

A. To store the physical addresses of all processes

c)

C. To manage CPU scheduling

d)

B. To map virtual addresses to physical addresses

17.

Which of the following best describes the term "thrashing" in a virtual memory context?

a)

C. High CPU performance

b)

D. Low memory fragmentation

c)

B. Excessive swapping of pages in and out of memory

d)

A. Efficient memory usage

18.

What is the main advantage of using a multi-level page table?

a)

C. It simplifies the memory management unit

b)

B. It increases the speed of memory access

c)

D. It eliminates page faults

d)

A. It reduces the size of the page table

19.

In a memory management system, what does the term "page replacement" refer to?

a)

A. The process of moving data from disk to memory

b)

D. The allocation of memory to processes

c)

C. The technique of compressing memory data

d)

B. The method of swapping out a page in memory for a new page

20.

Which algorithm is commonly used to manage memory allocation in a system?

a)

C. Shortest Job First

b)

D. First Come First Serve

c)

B. Least Recently Used (LRU)

d)

A. Round Robin

21.

What is the main disadvantage of using a single-level page table?

a)

D. It increases the speed of memory access

b)

C. It does not support virtual memory

c)

B. It can lead to excessive memory usage

d)

A. It is too complex to manage

22.

3. What does the OS do before switching to a new process?

a)

A. Deletes RAM contents

b)

B. Flushes the TLB and sets MMU to new page table

c)

C. Reboots the system

d)

D. Clears the screen

23.

6. In page fault handling, what does the OS do if the requested page is invalid?

a)

A. Continues execution anyway

b)

B. Loads a random page

c)

C. Terminates the process or sends an error signal

d)

D. Reboots the OS

24.

When using a memory-mapped file, which of the following statements is true?

a)

A. All writes to memory are immediately flushed to disk

b)

B. File I/O is handled entirely by kernel buffer copies

c)

C. The file contents are paged in on demand, not read in full immediately

d)

D. The entire file must be loaded into RAM before access

25.

In a two-handed clock cleaning policy, what is the role of the front hand?

a)

A. To choose the victim page for eviction

b)

B. To pin pages in memory

c)

C. To schedule page table updates

d)

D. To write dirty pages to disk and advance

26.

7. What is the main benefit of separating policy and mechanism in paging?

a)

A. Reduces CPU frequency

b)

B. Makes page faults disappear

c)

C. Allows easier modification and testing of memory policies

d)

D. Avoids TLB flushing

27.

What is the mathematical formula for overhead memory in paging (given s, e, p)?

a)

A. se/p + p/2

b)

B. s*p + e

c)

C. s/e + p*2

d)

D. se*p/2

28.

5 Which strategy allows processes to share modifiable pages efficiently

a)

A Static Linking

b)

B Copy on Write

c)

C Page Cleaning

d)

D Thrashing

29.

10. Why does the operating system preload some pages when a process starts?

a)

A. To save disk space

b)

B. To increase CPU response time

c)

C. To reduce the chance of continuous page faults during startup

d)

D. To avoid conflicts between processes

30.

9. What is the role of the TLB (Translation Lookaside Buffer) in paging?

a)

A. To store the entire RAM

b)

B. To convert physical addresses into virtual addresses

c)

C. To cache recent address translations for faster lookup

d)

D. To choose which page to replace

31.

What is the primary purpose of a page table in a virtual memory system?

a)

A. To store the physical addresses of all memory pages

b)

B. To map virtual addresses to physical addresses

c)

C. To manage CPU scheduling

d)

D. To keep track of disk space usage

32.

In a demand paging system, what occurs when a page fault happens?

a)

A. The process is terminated immediately

b)

B. The required page is loaded from disk into memory

c)

C. The CPU is reset

d)

D. The operating system ignores the request

33.

What is the effect of increasing the page size in a paging system?

a)

A. It reduces internal fragmentation

b)

B. It increases the number of page faults

c)

C. It decreases the size of the page table

d)

D. It has no effect on performance

34.

What is the purpose of the page replacement algorithm in a virtual memory system?

a)

C. To manage CPU scheduling

b)

B. To increase the size of the page table

c)

A. To determine which page to remove from memory

d)

D. To optimize disk access speed

35.

Which of the following best describes the term "working set" in the context of memory management?

a)

C. The amount of memory reserved for future use

b)

D. The memory space that is not currently in use

c)

B. The set of pages that a process is currently using

d)

A. The total memory allocated to a process

36.

What is the main disadvantage of using a multi-level page table?

a)

D. It does not support virtual memory

b)

A. Increased complexity in memory management

c)

B. Slower access times compared to single-level tables

d)

C. Higher memory consumption

37.

In a two-handed clock cleaning policy, what is the role of the front hand?

a)

A. To choose the victim page for eviction

b)

B. To pin pages in memory

c)

C. To schedule page table updates

d)

D. To write dirty pages to disk and advance

38.

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)

A. They are discarded

b)

B. They are immediately written to disk at each change

c)

C. They are automatically written back to the file on exit

d)

D. They are copied to swap space only

39.

What is the purpose of the Translation Lookaside Buffer (TLB) in a virtual memory system?

a)

B. To cache recent virtual-to-physical address translations

b)

D. To track memory allocation for processes

c)

A. To store the entire virtual memory

d)

C. To manage page replacement algorithms

40.

In a demand paging system, what happens when a page fault occurs?

a)

C. The CPU is halted until the page is available

b)

D. The page is swapped out immediately

c)

B. The required page is loaded from disk into memory

d)

A. The process is terminated

41.

Which of the following best describes the term "working set" in the context of memory management?

a)

A. The total amount of memory allocated to a process

b)

B. The set of pages that a process is currently using

c)

C. The pages that are swapped out to disk

d)

D. The memory space reserved for system processes

42.

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)

A. 512 KB

b)

B. 1 MB

c)

C. 32 KB

d)

D. 96 KB

43.

What is the primary purpose of the Translation Lookaside Buffer (TLB) in a virtual memory system?

a)

D. To increase the size of the page table

b)

A. To store all virtual addresses

c)

B. To cache recent translations of virtual addresses to physical addresses

d)

C. To manage page replacement algorithms

44.

In a virtual memory system, what does the term "page replacement" refer to?

a)

A. The process of loading pages from disk into memory

b)

D. The technique of compressing pages to save space

c)

B. The method of swapping out pages in memory for new pages

d)

C. The act of deleting pages from the page table

45.

Which of the following is a consequence of having a smaller page size in a paging system?

a)

C. Improved access speed

b)

B. Decreased number of page faults

c)

D. Reduced internal fragmentation

d)

A. Increased page table size

46.

What is the main function of a page replacement algorithm in a virtual memory system?

a)

D. To allocate memory for new processes

b)

C. To manage CPU scheduling

c)

B. To increase the size of the page table

d)

A. To determine which page to remove from memory

47.

How does the Least Recently Used (LRU) algorithm decide which page to evict?

a)

B. It evicts the page that is the largest

b)

A. It evicts the page that has been used the least recently

c)

C. It evicts the page that is the oldest

d)

D. It evicts the page that is currently in use

48.

What is the impact of page size on the performance of a virtual memory system?

a)

D. Larger page sizes decrease the size of the page table

b)

B. Smaller page sizes reduce the number of page faults

c)

A. Larger page sizes can lead to increased internal fragmentation

d)

C. Page size has no effect on performance

49.

Which of the following is an advantage of using shared libraries

a)

A Bigger executable files

b)

B Duplicated code in memory

c)

C Reduced memory usage and disk space

d)

D Static linking required

50.

Which of the following best describes the term "page fault" in a virtual memory system?

a)

A. A process being terminated

b)

D. A successful memory allocation

c)

B. A request for a page that is not currently in memory

d)

C. The process running out of memory

51.

What is the primary function of the page replacement algorithm?

a)

A. To increase the size of the page table

b)

D. To optimize disk I/O operations

c)

B. To determine which pages to swap out of memory

d)

C. To manage CPU scheduling

52.

What is the effect of increasing the page size in a virtual memory system?

a)

A. It increases the number of page faults

b)

B. It decreases the size of the page table

c)

C. It can lead to higher internal fragmentation

d)

D. It improves the speed of memory access