Question
Here are two transactions that are ordering a food menu at the same time. T1: Start the transaction at time t1, read 10 servings of
Here are two transactions that are ordering a food menu at the same time.
T1: Start the transaction at time t1, read 10 servings of food stock at t2. Because ordering one portion, the stock is reduced by 1 at t3. On t6, update the stock quantity, and commit on t7.
T2: Transaction T2 starts a transaction on t2, reads the number of stocks on t3 as many as 10. At t4 orders 3 portions. At t5, it updates the stock to 7 and then at t6 commits it.
As a result of the transactions T1 and T2 above, there is an error in the number of food stocks. Make a solution with 2PL. What kinds of problems happened? Give reasons why you chose this type of problem! How much food is still available?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started