Questions tagged [database-concurrency]
7 questions
2
votes
1 answer
Why do OS and DBMS have their own synchronisation mechanisms, when OS can alone do it and it sits at the bottom of DB?
I know that synchronization is important in the OS, but why do we need a separate topic synchronization and concurrency in the DBMS? The OS concentrates on program synchronization while the DBMS concentrates on data synchronization. Why can't the OS…
mahesh 2222
- 65
- 6
1
vote
0 answers
If two schedules have the same precedence graph, then they are conflict equivalent
Let $S_{1}$ and $S_{2}$ be two schedules over the same set of transactions. If both schedules have the same precedence graph, does it follow that $S_{1}$ and $S_{2}$ are conflict equivalent.
I think the claim makes sense as -
If two schedules…
Dexter Mandark
- 41
- 5
1
vote
1 answer
How are blind writes recoverable in a transaction schedule?
Consider the following schedule -
T1 T2
R(A)
W(A)
R(A)
W(A)
Commit
Commit
I understand that this schedule is non-recoverable, because if a failure occurs between the two commits, then we can't rollback the operations…
Kushagr Jaiswal
- 65
- 6
1
vote
1 answer
Does basic 2 PL always ensure conflict serializability?
While going through the DBMS book by Korth, it was mentioned :
" For a set of transactions, there may be conflict-serializable schedules that
cannot be obtained through the two-phase locking protocol.
Does this imply that basic 2 PL ensures…
mahesh 2222
- 65
- 6
0
votes
1 answer
Checking if Schedule is recoverable
Consider the following schedule S.Is S conflict–serializable? Append the commit operations of these transactions at the end of the
schedule in an appropriate order such that S is recoverable. How many such orders are there?
$$S: r1(X); r2(Z); r1(Z);…
bigstreet
- 13
- 3
0
votes
1 answer
What will you do if multiple users access your application at the same time?
I'm an experienced Software Engineer but very weak in concurrency because of no prior experience in that. I've been interviewing with several companies in which I was asked similar kinds of questions as given below:
If you are designing a fantasy…
SherlockHolmesKePapa
- 243
- 2
- 8
0
votes
2 answers
how two phase commit ensure serializability
Two phase commit is used in distributed transaction. For example, a client sends a transaction to two databases with a coordinator.
step1: client get a global transaction id from coordinator
step2: client send the transaction to two databases…
gaoxinge
- 101
- 1