Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 37
Q1001:
Which of the following best describes a page fault?
A. A memory access error
B. A situation where a page is accessed but is not in memory
C. A failure to load a program into memory
D. An address error that leads to process termination
Correct Answer:
B
Chapter: 37
Q1002:
Which bit in the page table entry indicates whether a page is in memory?
A. Valid bit
B. Invalid bit
C. Access bit
D. Page fault bit
Correct Answer:
A
Chapter: 37
Q1003:
The page table is used to map logical memory to which type of memory?
A. Physical memory
B. Virtual memory
C. Secondary memory
D. Cache memory
Correct Answer:
A
Chapter: 37
Q1004:
When a page fault occurs, which component of the system performs the paging operation?
A. CPU
B. Operating system
C. Disk controller
D. Memory manager
Correct Answer:
B
Chapter: 37
Q1005:
What is the role of the valid-invalid bit in paging systems?
A. It indicates whether a page is in memory or on disk
B. It marks a page as read-only
C. It locks a page in memory
D. It determines the access level of a page
Correct Answer:
A
Chapter: 37
Q1006:
Which type of memory is typically used as secondary memory in demand paging?
A. RAM
B. Disk
C. CPU cache
D. Virtual memory
Correct Answer:
B
Chapter: 37
Q1007:
The term "lazy swapper" in demand paging refers to which process?
A. Swapping out pages that are not used
B. Swapping entire processes into memory
C. Bringing pages into memory only when required
D. Moving pages into memory before execution
Correct Answer:
C
Chapter: 37
Q1008:
In demand paging, the system swaps in pages from disk when needed and avoids swapping which pages?
A. All pages
B. Only needed pages
C. Unused pages
D. Pages from memory-mapped files
Correct Answer:
B
Chapter: 37
Q1009:
A page fault trap is caused when the system attempts to access which of the following?
A. A page that is not in memory
B. A page that is marked as valid
C. A page that is already in memory
D. A page that is locked
Correct Answer:
A
Chapter: 37
Q1010:
When a page fault occurs, which of the following is the first step in handling the fault?
A. Read the page from disk
B. Check the page's status
C. Save the CPU's state
D. Schedule a disk operation
Correct Answer:
B
Chapter: 37
Q1011:
In a paging system, which hardware component is responsible for translating the virtual address to a physical address?
A. Page table
B. CPU register
C. Disk
D. Memory controller
Correct Answer:
A
Chapter: 37
Q1012:
The process of bringing a page into memory only when it is needed is known as what?
A. Demand paging
B. Swapping
C. Segmentation
D. Virtualization
Correct Answer:
A
Chapter: 37
Q1013:
What happens after the OS has serviced a page fault and the required page is loaded into memory?
A. The process is restarted from the instruction that caused the page fault
B. The process is terminated
C. The page is marked as invalid
D. The process is suspended
Correct Answer:
A
Chapter: 37
Q1014:
A program can continue executing after a page fault because the OS saves which of the following?
A. Page table
B. Process state and register values
C. All of the above
D. None of the above
Correct Answer:
B
Chapter: 37
Q1015:
Which memory access time factor influences the overall performance of demand paging?
A. Page fault rate
B. CPU clock speed
C. Virtual memory size
D. Disk read/write speed
Correct Answer:
A
Chapter: 37
Q1016:
In demand paging, a page is swapped out only if:
A. It is not needed by any process
B. It has not been accessed for a long time
C. It is the least frequently used
D. The page table entry is marked invalid
Correct Answer:
B
Chapter: 37
Q1017:
The page fault service time consists of which of the following components?
A. Reading the page from disk
B. Saving user registers
C. Restarting the process
D. All of the above
Correct Answer:
D
Chapter: 37
Q1018:
The page fault service time is most significantly affected by:
A. Disk access time
B. CPU processing time
C. Memory access time
D. Virtual memory size
Correct Answer:
A
Chapter: 37
Q1019:
What happens if a process tries to access a page that is not in memory?
A. A page fault occurs
B. The process is terminated immediately
C. The system shuts down
D. The page is loaded from disk
Correct Answer:
A
Chapter: 37
Q1020:
Which of the following is NOT a benefit of demand paging?
A. Efficient process creation
B. Less I/O and faster execution
C. Increased memory utilization
D. No page faults during execution
Correct Answer:
D