• 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 2 out of 5 pages
Other

Cop 4610 Exam 2 Study Guide

Document preview thumbnail
Preview 2 out of 5 pages

COP 4610 EXAM 2 STUDY GUIDE

Content preview

COP 4610 EXAM 2 STUDY GUIDE

monitor is ... - Answer -a lock + condition variables

lock provides... - Answer -mutual exclusion to shared data

condition variable provides.... - Answer -a queue for waiting threads inside a critical
section

what are the three operations for condition variables - Answer -wait, signal, broadcast

how does a hoare monitor work? - Answer -signal() transfers the CPU directly to a
waiting thread.

how does a mesa monitor work? - Answer -signal() only puts a waiting thread on the
scheduler's ready queue

by the time the waken thread gets the CPU, the waiting condition may no longer be true
and needs to be retested.

Structure of reader/writer solution - Answer -Reader: wait until no writers, access
database, wake up waiting writers

Writer: wait until no active readers or writers, access database, wake up waiting readers
or writers

Can you implement monitors with semaphores? - Answer -nope! conditional variables
only work inside a lock, which may cause a deadlock

difference between semaphores and monitors? - Answer -condition variables have
history

def. deadlock - Answer -occur when threads are waiting for resources with circular
dependencies

nonpreemptable resources - Answer -resources which cannot be taken away from its
current thread without failing the computation

deadlocks that involve preemptable resources can usually be resolved by... - Answer -
reallocation of resources

T/F? Deadlocks can be resolved for each resource independently. - Answer -False

T/F? Robin Round cannot prevent deadlocks. - Answer -True

, Deadlock conditions (4): - Answer -(1) Limited access (lock-protected resources)
(2) No preemption (if someone has the resource, it cannot be taken away)
(3) Wait while holding (holding a resource while requesting and waiting for the next
resource)
(4) Circular chain of requests

T/F? If all 4 deadlock conditions are true, there is a deadlock. - Answer -False

T/F? If there is a deadlock, all 4 conditions are true. - Answer -True

To prevent deadlocks - Answer -remove one of the four conditions

Deadlock prevention techniques (8) - Answer -1. Infinite resources

2. No sharing/independent threads

3. Allocate all resources at the beginning

4. Make everyone use the same ordering in accessing resource (All threads must call
P(x) before P(y)).

5. No waiting

6. Preempt resources

7. Banker's algorithm

8. A combination of techniques

Banker's algorithm - Answer -a thread states its maximum resources needs in advance

OS allocates resource dynamically as needed. a thread waits if granting its request
would lead to deadlocks

a request can be granted if some sequential ordering of threads is deadlock free

uniprogramming without memory protection - Answer -each application runs within a
hardwired range of physical memory addresses.

one application runs at a time

when a program is copied into memory, a ___ alters the code of the program - Answer
-linker-loader

memory protection keeps ____ - Answer -user programs from crashing one another
and the OS

Document information

Uploaded on
November 2, 2025
Number of pages
5
Written in
2025/2026
Type
Other
Person
Unknown
$12.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.
Greaterheights
4.0
(224)
Sold
1179
Followers
882
Items
20995
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