Chapter 21 Flashcards
What is CS
Critical Section
Does bakery algorithm satisfies all 3 requirements
1- Mutual exclusion
2- Progress
3- Bounded-waiting
Yes
Does bounded waiting follows FCFS
Yes
Does hardware-based solutions are related to hardware
No. It is related to CPU instructions
The access to memory location excludes other access to same memory location. It is normal for hardware solutions. What is extension in hardware solutions
Designers have proposed machine instructions that perform two operations atomically (indivisbly) on same memory location (e.g. reading and writing) (it means 2 operations in single instruction)
What TSL/Read Modify Write instruction do
Test-and-set instruction. test and modify a word atomically.
What is swap instruction
It swaps 2 variables. It plays with key and lock. It turns key value false and lock true and vice versa to perform operation.