• 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 7 pages
Other

Cop 4610 Exam 2 Wang Study Guide

Document preview thumbnail
Preview 2 out of 7 pages

COP 4610 EXAM 2 WANG STUDY GUIDE

Content preview

COP 4610 EXAM 2 WANG STUDY GUIDE

Monitor - Answer -A lock + condition variables

Lock - Answer -provides mutual exclusion to shared data.

a lock provides two operations
-Acquire()
-Release()

Condition Variable - Answer -provides a queue for waiting threads inside a critical
section

each conditional variable
-consists of a queue of threads
-Provides three operations
**wait()
**Signal()
**Broadcast()

Hoare vs. Mesa Monitors - Answer -Hoare Monitors (used in most textbooks)
-Signal() transfers the CPU directly to a waiting thread.

Mesa Monitors (used in most real operating systems)
-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.

Semaphores VS Monitors - Answer -We can't quite implement monitors with
semaphores.

Condition variables only work inside a lock
-using semaphores inside a lock may deadlock

Condition variables have no history, but semaphores have
-Signal() with an empty queue does nothing
**A subsequent Wait() will wait
-V() increments semaphore
**A subsequent P() will not wait
-Wait() will always wait
-P() might not wait

Deadlock - Answer -Occur when threads are waiting for resources with circular
dependencies.

, Deadlock implies starvation

Preemptable Resource - Answer -EX- CPU
can be resolved by reallocation of resources

Nonpreemptable Resource - Answer -A resource that cannot be taken away from its
current owner without causing computation to fail

Starvation - Answer -a thread waits indefinitely

Checkpointing - Answer -taking snapshots of system states from time to time

Four Conditions for Deadlocks - Answer -limited access (lock-protected resources)

no preemption (if someone has the resource, it cannot be taken away)

wait while holding (holding a resource while requesting and waiting for the next
resource)

circular chain of requests

Banker's Algorithm - Answer --A thread states its maximum resource needs in advance.

-The 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.

Deadlock Recovery Techniques - Answer -* Scan the resource allocation graph

* Detect circular chains of requests

* Recover from the deadlock

Interprocess Communication - Answer -Processes communicate among address
spaces.
-Bug stream ex. pipe
-Message passing (send/receive)
-File system (read and write)
-Shared memory

Direct
-send(P1, message);
-receive(P2, message);
-One-to-one communication

Document information

Uploaded on
November 2, 2025
Number of pages
7
Written in
2025/2026
Type
Other
Person
Unknown
$13.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
883
Items
21008
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