CS – C191 ITEC 2211 Operation Systems for
Programmers
Comprehensive Objective Assessment (Qns &
Ans)
2025
1. Which scheduling algorithm prevents starvation by increasing
the priority of waiting processes over time?
a) First-Come, First-Served
b) Shortest Job First
c) Priority Scheduling
d) Aging
ANS: d) Aging
Rationale: Aging gradually increases the priority of waiting
processes to prevent starvation.
©2025
,2. In distributed systems, what protocol ensures that all nodes
agree on a transaction's outcome even in case of failures?
a) Token Ring
b) 2-Phase Commit
c) Time-Sliced Scheduling
d) RPC Chaining
ANS: b) 2-Phase Commit
Rationale: The 2-Phase Commit protocol ensures atomic
transaction commits across distributed nodes.
3. Which of the following is NOT a primary goal of virtual
memory?
a) Simplified programming
b) Increased execution speed by eliminating paging overhead
c) Efficient utilization of main memory
d) Protection and isolation among processes
ANS: b) Increased execution speed by eliminating paging
overhead
©2025
,Rationale: Paging overhead is a cost of virtual memory, not a
benefit.
4. Consider a UNIX system implementing demand paging. What
could cause a process to experience thrashing?
a) Having more frames than needed
b) Frequent page faults due to insufficient frames
c) High CPU burst times
d) Context switching
ANS: b) Frequent page faults due to insufficient frames
Rationale: Thrashing occurs when frequent page faults cause
excessive swapping.
5. Which synchronization primitive is most suitable to prevent
race conditions when several threads update a shared counter?
a) Barrier
b) Mutex
c) Condition Variable
d) Spinlock
ANS: b) Mutex
©2025
, Rationale: Mutexes ensure mutual exclusion for critical sections.
6. What is the primary purpose of the 'inode' structure in UNIX
file systems?
a) Storing the file's content
b) Storing metadata about a file, including pointers to its data
blocks
c) Allocating disk sectors on demand
d) Managing network file sharing
ANS: b) Storing metadata about a file, including pointers to its
data blocks
Rationale: Inodes contain file metadata and pointers, but not the
file content itself.
7. Which of the following best explains the role of the OS in
deadlock detection?
a) It uses the Banker's algorithm to allocate resources safely.
b) It ignores deadlocks, leaving them to be resolved by users.
c) It preempts resources whenever possible.
d) It periodically checks the resource allocation graph for cycles.
©2025
Programmers
Comprehensive Objective Assessment (Qns &
Ans)
2025
1. Which scheduling algorithm prevents starvation by increasing
the priority of waiting processes over time?
a) First-Come, First-Served
b) Shortest Job First
c) Priority Scheduling
d) Aging
ANS: d) Aging
Rationale: Aging gradually increases the priority of waiting
processes to prevent starvation.
©2025
,2. In distributed systems, what protocol ensures that all nodes
agree on a transaction's outcome even in case of failures?
a) Token Ring
b) 2-Phase Commit
c) Time-Sliced Scheduling
d) RPC Chaining
ANS: b) 2-Phase Commit
Rationale: The 2-Phase Commit protocol ensures atomic
transaction commits across distributed nodes.
3. Which of the following is NOT a primary goal of virtual
memory?
a) Simplified programming
b) Increased execution speed by eliminating paging overhead
c) Efficient utilization of main memory
d) Protection and isolation among processes
ANS: b) Increased execution speed by eliminating paging
overhead
©2025
,Rationale: Paging overhead is a cost of virtual memory, not a
benefit.
4. Consider a UNIX system implementing demand paging. What
could cause a process to experience thrashing?
a) Having more frames than needed
b) Frequent page faults due to insufficient frames
c) High CPU burst times
d) Context switching
ANS: b) Frequent page faults due to insufficient frames
Rationale: Thrashing occurs when frequent page faults cause
excessive swapping.
5. Which synchronization primitive is most suitable to prevent
race conditions when several threads update a shared counter?
a) Barrier
b) Mutex
c) Condition Variable
d) Spinlock
ANS: b) Mutex
©2025
, Rationale: Mutexes ensure mutual exclusion for critical sections.
6. What is the primary purpose of the 'inode' structure in UNIX
file systems?
a) Storing the file's content
b) Storing metadata about a file, including pointers to its data
blocks
c) Allocating disk sectors on demand
d) Managing network file sharing
ANS: b) Storing metadata about a file, including pointers to its
data blocks
Rationale: Inodes contain file metadata and pointers, but not the
file content itself.
7. Which of the following best explains the role of the OS in
deadlock detection?
a) It uses the Banker's algorithm to allocate resources safely.
b) It ignores deadlocks, leaving them to be resolved by users.
c) It preempts resources whenever possible.
d) It periodically checks the resource allocation graph for cycles.
©2025