• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 19 pages
Exam (elaborations)

Operating Systems Exam 2 Exam QUESTIONS AND CORRECT ANSWERS

Document preview thumbnail
Preview 3 out of 19 pages

Operating Systems Exam 2 Exam QUESTIONS AND CORRECT ANSWERS Assume count is a variable name, which of the following operations is atomic? - CORRECT ANSWER D. none of the above Which of the following is true for race condition? - CORRECT ANSWER occurs where several processes access and manipulate the same data concurrently - Race condition - 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? - CORRECT ANSWER C) both of the above In _________, the process may be changing common variables, updating a table, writing a file, and so on. - CORRECT ANSWER Critical section In _________, the process requests permission to access and modify variables shared with others. - CORRECT 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? - CORRECT 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? - CORRECT 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? - CORRECT ANSWER Progress

Content preview

Operating Systems Exam 2 Exam
QUESTIONS AND CORRECT ANSWERS
Assume count is a variable name, which of the following operations is atomic? - CORRECT
ANSWER D. none of the above



Which of the following is true for race condition? - CORRECT 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? - CORRECT
ANSWER C) both of the above



In _________, the process may be changing common variables, updating a table, writing a file, and so
on. - CORRECT ANSWER Critical section



In _________, the process requests permission to access and modify variables shared with others. -
CORRECT 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? - CORRECT 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? - CORRECT 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? - CORRECT ANSWER Progress



Which of the following is true regarding the requirements for the solutions to critical-section
problem? - CORRECT ANSWER bounded waiting implies progress

,Which of the following is true for the solutions to critical-section problems? - CORRECT ANSWER
Bounded waiting implies progress, and progress implies no deadlock



Which of the following is NOT true for Peterson's solution? - CORRECT 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? -
CORRECT ANSWER both of the above



Which of the following indicates that Pi can enter the critical section in Peterson's solution? -
CORRECT ANSWER flag[j] == false or turn == i



Which of the following is a software-based solution to the critical-section problem? - CORRECT
ANSWER Peterson's solution



Which of the following solutions needs hardware support for the critical section problem? -
CORRECT ANSWER All of the above



Which of the following is not true about test_and_set instruction? - CORRECT ANSWER
Returns the new value of passed parameter



Which of the following is not true about compare_and_swap instruction? - CORRECT 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? - CORRECT ANSWER
both of statement 1 and 2



Which of the following regarding mutex lock is NOT true? - CORRECT 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? -
CORRECT ANSWER 0

, The counting semaphore is initialized to ___________. - CORRECT ANSWER the number of
resources available



Which of the following is NOT true regarding semaphore implementation? - CORRECT 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? -
CORRECT ANSWER wait() followed by signal()



Which of the following statements is true? - CORRECT ANSWER Spinlocks can be used to
prevent busy waiting in the implementation of semaphore.



Which of the following is NOT true? - CORRECT ANSWER Since semaphore and mutex lock
are tools for synchronization, process that have used semaphores or mutex locks should not cause
deadlocks



Which of the following is NOT true regarding conditional variable, e.g. x? - CORRECT ANSWER
x.wait()means that the process invoking this operation is suspended until another process
invokes x.signal()



Which of the following may cause a liveness failure? - CORRECT ANSWER all of the options



Which of the following is true? - CORRECT ANSWER Deadlock doesn't imply starvation;



Under which of the following contention loads does traditional synchronization become faster than
CAS-based synchronization? - CORRECT ANSWER high contention



Which of the following are efforts to towards developing scalable, efficient tools that address the
demands of concurrent programming? - CORRECT ANSWER all of the options



Race conditions can result in corrupted values of shared data. - CORRECT ANSWER

Document information

Uploaded on
July 2, 2026
Number of pages
19
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
70
Followers
2
Items
10481
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions