GATE Exam  >  GATE Questions  >  Consider transaction T0 and T1 which are defi... Start Learning for Free
Consider transaction T0 and T1 which are defined as:
T0: read(A);
A = A – 50;
write(A);
read(B);
B : = B + 50;
Write(B);
T1 : read(C);
C: = C – 100;
Write(C);
A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?
A = 950
B = 2050
 
 
 
  • a)
    Redo action will be taken
  • b)
    Database will appear as
  • c)
    log will appear as
  • d)
    none of the above
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider transaction T0 and T1 which are defined as:T0: read(A);A = A ...
The log at the time of the crash appears as in option (c). When the system comes back up, no redo action needs to be taken, since no commit record appears in the log. The values of A and B remain Rs. 1000 and Rs. 2000 respectively.
View all questions of this test
Most Upvoted Answer
Consider transaction T0 and T1 which are defined as:T0: read(A);A = A ...
+ 1;write(A);T1: read(A);A = A - 1;write(A);Let's analyze the possible outcomes of these transactions based on their execution order:1. T0 executes before T1:In this case, T0 reads the value of A (let's say it's initially 5), increments it to 6, and writes the updated value back to A. Then, T1 reads the updated value of A (6), subtracts 1 from it (resulting in 5), and writes the updated value back to A. The final value of A is 5.2. T1 executes before T0:In this case, T1 reads the initial value of A (let's say it's 5), subtracts 1 from it (resulting in 4), and writes the updated value back to A. Then, T0 reads the updated value of A (4), increments it to 5, and writes the updated value back to A. The final value of A is 5.3. T0 and T1 execute concurrently:In this case, the outcome depends on the interleaving of their operations. However, since both transactions perform conflicting operations on A (i.e., read and write), they cannot execute concurrently without coordination mechanisms such as locks or serializable isolation levels. If there is no coordination, they may produce inconsistent results, such as lost updates or dirty reads.
Explore Courses for GATE exam
Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer?
Question Description
Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer?.
Solutions for Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider transaction T0 and T1 which are defined as:T0: read(A);A = A – 50;write(A);read(B);B : = B + 50;Write(B);T1 : read(C);C: = C – 100;Write(C);A, B, C before execution were Rs. 1000, Rs. 2000, Rs. 700 respectively and the system crash occurs after write (B), then which of the following is correct?A = 950B = 2050a)Redo action will be takenb)Database will appear asc)log will appear asd)none of the aboveCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev