CS代考 COMP 3430 Guderian

Operating Systems
COMP 3430 Guderian

Copyright By PowCoder代写 加微信 powcoder

We¡¯ve seen them, now what?

We¡¯ve seen them, now what? A history lesson

Interrupts
Two questions:

Interrupts
Two questions: A. Why was this effective?

Interrupts
Two questions:
A. Why was this effective?
B. Why did we move away from this?

Global lock
Disabling interrupts is a global lock!
We can compare locks using 3 features of the locks:
Mutual exclusion (you have one job…) Fairness
Performance
What does disabling locks give us?

Would we ever use it?
Sure, it¡¯s unfair, is it still relevant?

while (I don’t have the lock): sleep(0.1)
I have the lock!

Load-store
How about this solution: setting our flag before we check their flag
Then, if we have the lock we have the lock Otherwise, leave our flag, and wait for their flag to clear
flag[0] = true;
while (flag[1]) {}
// we have the lock! // Done CS, free lock: flag[0] = false;

Deadlock is real too
Mutex fails if we deadlock … too exclusive?

flag[0] = true; while(flag[1]){
flag[0] = false; // give up lock sleep(1);
flag[0] = true; // try again!
// have lock
flag[0] = false;

the concept of a ¡°turn¡± Pass the turn around.
Is Dekker: mutex/fair/performant?

What does yield actually change?
We can yield the processor… what does that change in our analysis?

This is hard! If only we had tools for this

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com