Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

COS3721 Chapter 6 Exam Questions And Answers 100% Verified And Updated.

Document preview thumbnail
Preview 2 out of 6 pages

COS3721 Chapter 6 Exam Questions And Answers 100% Verified And Updated. 1. A race condition ____. A) results when several threads try to access the same data concurrently B) results when several threads try to access and modify the same data concurrently C) will result only if the outcome of execution does not depend on the order in which instructions are executed D) None of the above - AnswerB 2. An instruction that executes atomically ____. A) must consist of only one machine instruction B) executes as a single, uninterruptible unit C) cannot be used to solve the critical section problem D) All of the above - AnswerB 3. A counting semaphore ____. A) is essentially an integer variable B) is accessed through only one standard operation C) can be modified simultaneously by multiple threads D) cannot be used to control access to a thread's critical sections - AnswerA 4. A mutex lock ____. A) is exactly like a counting semaphore B) is essentially a boolean variable C) is not guaranteed to be atomic D) can be used to eliminate busy waiting - AnswerB 5. In Peterson's solution, the ____ variable indicates

Content preview

©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.




COS3721 Chapter 6 Exam Questions And
Answers 100% Verified And Updated.


1. A race condition ____.
A) results when several threads try to access the same data concurrently
B) results when several threads try to access and modify the same data concurrently
C) will result only if the outcome of execution does not depend on the order in which
instructions are executed
D) None of the above - Answer✔B
2. An instruction that executes atomically ____.
A) must consist of only one machine instruction
B) executes as a single, uninterruptible unit
C) cannot be used to solve the critical section problem
D) All of the above - Answer✔B
3. A counting semaphore ____.
A) is essentially an integer variable
B) is accessed through only one standard operation
C) can be modified simultaneously by multiple threads
D) cannot be used to control access to a thread's critical sections - Answer✔A
4. A mutex lock ____.
A) is exactly like a counting semaphore
B) is essentially a boolean variable
C) is not guaranteed to be atomic
D) can be used to eliminate busy waiting - Answer✔B
5. In Peterson's solution, the ____ variable indicates if a process is ready to enter its critical
section.

1|Page

, ©FYNDLAY 2024/2025 ALL RIGHTS RESERVED.

A) turn B) lock
C) flag[i] D) turn[i] - Answer✔C
6. The first readers-writers problem ____.
A) requires that, once a writer is ready, that writer performs its write as soon as possible.
B) is not used to test synchronization primitives.
C) requires that no reader will be kept waiting unless a writer has already obtained permission to
use the shared database.
D) requires that no reader will be kept waiting unless a reader has already obtained permission to
use the shared database. - Answer✔C
7. A ___ type presents a set of programmer-defined operations that are provided mutual
exclusion within it.
A) transaction B) signal
C) binary D) monitor - Answer✔D
8. ____________ occurs when a higher-priority process needs to access a data structure that is
currently being accessed by a
lower-priority process.
A) Priority inversion
B) Deadlock
C) A race condition
D) A critical section - Answer✔A
9. What is the correct order of operations for protecting a critical section using mutex locks?
A) release() followed by acquire()
B) acquire() followed by release()
C) wait() followed by signal()
D) signal() followed by wait() - Answer✔B
10. What is the correct order of operations for protecting a critical section using a binary
semaphore?
A) release() followed by acquire()
B) acquire() followed by release()
C) wait() followed by signal()
D) signal() followed by wait() - Answer✔C

2|Page

Document information

Uploaded on
January 23, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.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.
Fyndlay
3.7
(77)
Sold
428
Followers
82
Items
21033
Last sold
3 days 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