A taxonomy of concurrency control algorithms can classify algorithms as pessimistic or optimistic. Compare and contrast these algorithms.
What will be an ideal response?
Optimistic: assume not too many transactions will conflict with one another. Delay
synchronization of transactions until their termination.
Pessimistic: assume many transactions will conflict with each other. Synchronization execution of
transactions early in their lifecycle.
You might also like to view...
Given the following pseudocode, what is the value of myGrade after the call to the curveScore module?
``` Module main() Declare Integer myGrade Set myGrade = 82 Call curveScore(myGrade) End Module Module curveScore(Integer score) Declare Integer newScore Set newScore = score + 5 Display newScore End Module ``` a. 87 b. 82 c. 5 d. cannot tell
Which of the following statements is false?
a. Thread synchronization is necessary only for shared mutable data, i.e., data that may change during its lifetime. b. With shared immutable data that will not change, it’s not possible for a thread to see old or incorrect values as a result of another thread’s manipulation of that data. c. When you share immutable data across threads, declare the corresponding data fields final to indicate that the values of the variables will not change after they’re initialized. This prevents accidental modification of the shared data, which could compromise thread safety. d. Labeling object references as final indicates that the referenced object is immutable.