100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS3721 ASSIGNMENT 2 SOLUTIONS 2021 R301,00   Add to cart

Exam (elaborations)

COS3721 ASSIGNMENT 2 SOLUTIONS 2021

 26 views  2 purchases

COS3721 ASSIGNMENT 2 SOLUTIONS 2021

Preview 1 out of 21  pages

  • July 4, 2021
  • 21
  • 2021/2022
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (31)
avatar-seller
hiltontutorials
COS3721 ASSIGNMENT 2 SOLUTIONS 2021

QUESTION 1 Deadlock

2.1 Assume that a multithreaded application uses only reader–writer locks for
synchronization. Applying the four necessary conditions for deadlock, is deadlock still
possible if multiple reader–writer locks are used?

Yes when applying the four deadlock conditions for a deadlock , the deadlock is still
possible. If multiple readers as follows :

1. Mutual exclusion is maintained, as they cannot be shared if there is a writer.

2. Hold-and-wait is possible, as a thread can hold one reader writer lock while waiting to
acquire another.

3. You cannot take a lock away, so no preemption is upheld.

4. A circular wait among all threads is possible.




2.2 Consider the following snapshot of a system:




Allocation Max
ABCD ABCD
T0 1 2 0 2 4 3 1 6
T1 0 1 1 2 2 4 2 4
T2 1 2 4 0 3 6 5 1
T3 1 2 0 1 2 6 2 3
T4 1 0 0 1 3 1 1 2

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller hiltontutorials. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R301,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67163 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R301,00  2x  sold
  • (0)
  Buy now