Tutorial Week 13

Questions

Q1: What are the advantages and disadvantages of using a global scheduling queue over per-CPU queues? Under which circumstances would you use the one or the other? What features of a system would influence this decision?

Q2: When does spinning on a lock (busy waiting, as opposed to blocking on the lock, and being woken up when it's free) make sense in a multiprocessor environment?

Q3: Why is preemption an issue with spinlocks?

Q4: How does a read-before-test-and-set lock work and why does it improve scalability?

Q5: Describe how an MCS lock further improves scalability compared to a read-before-test-and-set lock? What is a disadvantage of an MCS lock?