OPERATING SYSTEMS EXAM 2 | QUESTIONS AND
ANSWERS | LATEST 2025/2026 UPDATE | WITH
COMPLETE SOLUTION!!
Assume count is a variable name, which of the following operations is atomic?
Answer - D. none of the above
Which of the following is true for race condition? Answer - - Race condition
occurs where several processes access and manipulate the same data
concurrently
- When race condition occurs, the outcome of the execution depends on the
particular order in which the access takes place
Which of the following actions should be performed among cooperating
processes? Answer - C) both of the above
In _________, the process may be changing common variables, updating a
table, writing a file, and so on. Answer - Critical section
In _________, the process requests permission to access and modify variables
shared with others. Answer - Entry Section
Which of the following critical-section problem's requirements ensures only
one process is active in its critical section at a time? Answer - mutual exclusion
,Which of the following critical-section problem's requirements ensures
programs will cooperatively determine what process will next enter its critical
section? Answer - progress
Which of the following critical-section problem's requirements limits the
amount of time a program will wait before it can enter its critical section?
Answer - Progress
Which of the following is true regarding the requirements for the solutions to
critical-section problem? Answer - bounded waiting implies progress
Which of the following is true for the solutions to critical-section problems?
Answer - Bounded waiting implies progress, and progress implies no deadlock
Which of the following is NOT true for Peterson's solution? Answer - Peterson's
solution works for synchronization among more than two processes
Which of the following variables are shared between the processes in
Peterson's solution? Answer - both of the above
Which of the following indicates that Pi can enter the critical section in
Peterson's solution? Answer - flag[j] == false or turn == i
Which of the following is a software-based solution to the critical-section
problem? Answer - Peterson's solution
Which of the following solutions needs hardware support for the critical
section problem? Answer - All of the above
, Which of the following is not true about test_and_set instruction? Answer -
Returns the new value of passed parameter
Which of the following is not true about compare_and_swap instruction?
Answer - It is executed atomicallyN) Returns the original value of passed
parameter*D) Set the new value of passed parameter to "TRUE"E) Set the
variable "value" the value of the passed parameter "new_value" but only if
"value" =="expected"
Assume the binary variable lock is initialized to be 0, which of the following can
be an implementation of the entry section to solve the critical-section
problem? Answer - both of statement 1 and 2
Which of the following regarding mutex lock is NOT true? Answer - mutex lock
is a hardware solution to critical-section problem
When mutex lock is implemented as a binary semaphore, what should its value
be initialized to be? Answer - 0
The counting semaphore is initialized to ___________. Answer - the number of
resources available
Which of the following is NOT true regarding semaphore implementation?
Answer - A process that is suspended, waiting on the semaphore, should be
restarted when some other process executes a signal() operation.
What is the correct order of operations for protecting a critical section using a
binary semaphore? Answer - wait() followed by signal()
ANSWERS | LATEST 2025/2026 UPDATE | WITH
COMPLETE SOLUTION!!
Assume count is a variable name, which of the following operations is atomic?
Answer - D. none of the above
Which of the following is true for race condition? Answer - - Race condition
occurs where several processes access and manipulate the same data
concurrently
- When race condition occurs, the outcome of the execution depends on the
particular order in which the access takes place
Which of the following actions should be performed among cooperating
processes? Answer - C) both of the above
In _________, the process may be changing common variables, updating a
table, writing a file, and so on. Answer - Critical section
In _________, the process requests permission to access and modify variables
shared with others. Answer - Entry Section
Which of the following critical-section problem's requirements ensures only
one process is active in its critical section at a time? Answer - mutual exclusion
,Which of the following critical-section problem's requirements ensures
programs will cooperatively determine what process will next enter its critical
section? Answer - progress
Which of the following critical-section problem's requirements limits the
amount of time a program will wait before it can enter its critical section?
Answer - Progress
Which of the following is true regarding the requirements for the solutions to
critical-section problem? Answer - bounded waiting implies progress
Which of the following is true for the solutions to critical-section problems?
Answer - Bounded waiting implies progress, and progress implies no deadlock
Which of the following is NOT true for Peterson's solution? Answer - Peterson's
solution works for synchronization among more than two processes
Which of the following variables are shared between the processes in
Peterson's solution? Answer - both of the above
Which of the following indicates that Pi can enter the critical section in
Peterson's solution? Answer - flag[j] == false or turn == i
Which of the following is a software-based solution to the critical-section
problem? Answer - Peterson's solution
Which of the following solutions needs hardware support for the critical
section problem? Answer - All of the above
, Which of the following is not true about test_and_set instruction? Answer -
Returns the new value of passed parameter
Which of the following is not true about compare_and_swap instruction?
Answer - It is executed atomicallyN) Returns the original value of passed
parameter*D) Set the new value of passed parameter to "TRUE"E) Set the
variable "value" the value of the passed parameter "new_value" but only if
"value" =="expected"
Assume the binary variable lock is initialized to be 0, which of the following can
be an implementation of the entry section to solve the critical-section
problem? Answer - both of statement 1 and 2
Which of the following regarding mutex lock is NOT true? Answer - mutex lock
is a hardware solution to critical-section problem
When mutex lock is implemented as a binary semaphore, what should its value
be initialized to be? Answer - 0
The counting semaphore is initialized to ___________. Answer - the number of
resources available
Which of the following is NOT true regarding semaphore implementation?
Answer - A process that is suspended, waiting on the semaphore, should be
restarted when some other process executes a signal() operation.
What is the correct order of operations for protecting a critical section using a
binary semaphore? Answer - wait() followed by signal()