Chapter 1 Flashcards
What does multiple threads make up?
Processes
What 2 methods are there for providing mutual exclusion?
Can and Flags
What is Mutual Exclusion?
Separate Threads from accessing CS at the same time
What is the liveness property
Something good will happen eventually
Why wont the Message-passing work?
Recipient might not be listening/there at all
Problem with Can Protocol
Cans cannot be reused so you will run out of memory
Problem with Flags (without locks)
If both raise their flags at the same time it could lead to deadlock
Is the flag protocol (with defer) Deadlock and Starvation free?
No. It is deadlock free but The one that is being deferred might never get a chance with the CS.
Is the flag protocol fair and does it use waiting?
Unfair + waiting
Does the Can method work for Producer/Consumer?
Yes
What is the bounded buffer problem?
2 processes share common fixed-size buffer. Dont add if full. Dont remove if empty
What is the problem with waiting?
If one is delayed everyone is delayed. delays are common & unpredictable
Does upgrading from uniprocessor to a n-way MP increase performance linearly?
No
Amdahls Law Equation:
s = 1/(1-p +(p/n))