Lost Update J Install multiple hard drive and use all of them K use better page
ID: 3569474 • Letter: L
Question
Lost Update
J Install multiple hard drive and use all of them K use better page replacement algorithm IV. (25) Lost Update p1, p2, ... are processes. x, y, z ... are common variables. A, b, ... are local variables. Consider two processes: p1, p2. The processes access one and only one common variable x and several local variables. Will the following problem has lost update? 4.1 P1 will : Repeat 1000 time: c1 = x; c1 = c1+ 100; x = c1; end repeat. 4.2 p1 will : Repeat 1000 time: c1 = a; c1 = c1+ 100; a = c1; end repeat. P2 will : Repeat 1000 time: C2 = b; C2 = C2 - 100; b = C2; end repeat.Explanation / Answer
4.1. This particular algorithm will suffer from the lost update problem because both the processes P1 and P2 are making changes on the common variable 'x' and the update due to one problem can get lost due to the update caused by another process.
4.2. This particular algorithm will not suffer from the lost update problem as both processes are accessing unique variables 'a' and 'b' which are not shared by them.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.