CSC 415 Operating System Principles Unit 05
Exam Study Guide
A race condition ______.
Select one:
a. will result only if the outcome of execution does not depend on the order in which
instructions are executed
b. None of the other answers
c. results when several threads try to access the same data concurrently
d. results when several threads try to access and modify the same data concurrently -
ANSWER d. results when several threads try to access and modify the same data
concurrently
Instructions from different processes can be interleaved when interrupts are allowed.
Select one:
True
False - ANSWER True
A nonpreemptive kernel is safe from race conditions on kernel data structures.
Select one:
True
False - ANSWER True
,A solution to the critical section problem does not have to satisfy which of the following
requirements?
Select one:
a. progress
b. atomicity
c. mutual exclusion
d. bounded waiting - ANSWER b. atomicity
A(n) _______ refers to where a process is accessing/updating shared data.
Select one:
a. mutex
b. critical section
c. entry section
d. test-and-set - ANSWER b. critical section
Race conditions are prevented by requiring that critical regions be protected by locks.
Select one:
True
False - ANSWER True
Both the test_ and_set() instruction and compare_and_swap() instruction are executed
, atomically.
Select one:
True
False - ANSWER True
An instruction that executes atomically ____.
Select one:
a. cannot be used to solve the critical section problem
b. executes as a single, uninterruptible unit
c. must consist of only one machine instruction
d. All of the other answers - ANSWER b. executes as a single, uninterruptible unit
A mutex lock ____.
Select one:
a. is not guaranteed to be atomic
b. can be used to eliminate busy waiting
c. is exactly like a counting semaphore
d. is essentially a boolean variable - ANSWER d. is essentially a boolean variable
Exam Study Guide
A race condition ______.
Select one:
a. will result only if the outcome of execution does not depend on the order in which
instructions are executed
b. None of the other answers
c. results when several threads try to access the same data concurrently
d. results when several threads try to access and modify the same data concurrently -
ANSWER d. results when several threads try to access and modify the same data
concurrently
Instructions from different processes can be interleaved when interrupts are allowed.
Select one:
True
False - ANSWER True
A nonpreemptive kernel is safe from race conditions on kernel data structures.
Select one:
True
False - ANSWER True
,A solution to the critical section problem does not have to satisfy which of the following
requirements?
Select one:
a. progress
b. atomicity
c. mutual exclusion
d. bounded waiting - ANSWER b. atomicity
A(n) _______ refers to where a process is accessing/updating shared data.
Select one:
a. mutex
b. critical section
c. entry section
d. test-and-set - ANSWER b. critical section
Race conditions are prevented by requiring that critical regions be protected by locks.
Select one:
True
False - ANSWER True
Both the test_ and_set() instruction and compare_and_swap() instruction are executed
, atomically.
Select one:
True
False - ANSWER True
An instruction that executes atomically ____.
Select one:
a. cannot be used to solve the critical section problem
b. executes as a single, uninterruptible unit
c. must consist of only one machine instruction
d. All of the other answers - ANSWER b. executes as a single, uninterruptible unit
A mutex lock ____.
Select one:
a. is not guaranteed to be atomic
b. can be used to eliminate busy waiting
c. is exactly like a counting semaphore
d. is essentially a boolean variable - ANSWER d. is essentially a boolean variable