Concurrency and Transaction Management

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/30

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

31 Terms

1
New cards

What is Concurrency?

interleaving the execution of operations

needed for performance reasons

2
New cards

What are Schedules?

list of actions formed from a set of transactions

3
New cards

What is a Well-Formed Schedule?

a schedule where the actions of a particular transaction T are in the same order they appear in T

4
New cards

What is a Complete Schedule?

a schedule that contains an abort of commit action for every transaction that occurs in the schedule

5
New cards

What is a Serial Schedule?

a schedule where the actions of different transactions aren’t interleaved

6
New cards

What are Equivalent Schedules?

schedules involving the same set of operations on the same data objects

7
New cards

What are the Conditions for Conflicting Operations?

they belong to different transactions

they operate on the same data item

at least one of them is a write operation

8
New cards

What is ACID?

  • atomicity

  • consistency

  • isolation

  • durability

9
New cards

What is Atomicity?

ensures that a transaction either fully completes or doesn’t affect the database at all, even in the event of a failure

10
New cards

What is Consistency?

guarantees that a transaction brings the database from one valid state to another, maintaining defined rules and constraints

11
New cards

What is Isolation?

ensures that transactions are executed independently of each other, so intermediate results aren’t visible to other transactions until the transaction is complete

12
New cards

What is Durability?

guarantees that once a transaction is committed, the changes it made to the database are permanent, even if the system crashes immediately afterward

13
New cards

What is Concurrency Control?

mechanisms to ensure that multiple transactions can execute simultaneously without violating the consistency of the database

14
New cards

What is Locking Protocol?

a mechanism where transactions acquire locks on data objects to control access and prevent conflicting operations from occurring at the same time

15
New cards

What is a Lock (L)?

a variable associated with a data item that restricts access to that item

typically 2 types

16
New cards

What is a Shared Lock (S-Lock)?

allows multiple transactions to read a data item concurrently but prohibits writes

17
New cards

What is an Exclusive Lock (X-Lock)?

allows only one transaction to read and write a data item, blocking others from  accessing it

18
New cards

What is Deadlock?

a situation in which a set of transactions is blocked because each transaction is holding a lock and waiting for a lock held by another transaction in the set

19
New cards

What is Starvation?

a situation where a transaction can’t acquire the necessary locks due to continuous denial, often because other transactions are repeatedly prioritised

20
New cards

What is a Wait-Die Scheme?

deadlock prevention

older transactions wait for younger ones, and younger ones are aborted if they request resources held by older transactions

21
New cards

What is a Wound-Wait Scheme?

deadlock prevention

older transactions ‘wound’ younger transactions by forcing them to release resources, allowing the older transaction to proceed

22
New cards

What is the Two-Phase Locking (2PL) Protocol?

a concurrency control method that ensures serialisability by dividing a transaction’s life into 2 phases

growing - a transaction may acquire locks but can’t release any locks

shrinking - a transaction may release locks but can’t acquire any new locks

23
New cards

What is Strict 2PL?

transactions hold all acquired locks until they complete (commit/abort)

this prevents cascading aborts, as changes made by a transaction are visible only after it commits

24
New cards

What is Timestamp Ordering?

a non-locking concurrency control protocol that assigns timestamps to each transaction and enforces an order based on these timestamps to prevent conflicts

25
New cards

What is Validation-Based/Optimistic Concurrency Control?

where transactions are allowed to execute without locking, but at the commit time, they are validated for potential conflict

26
New cards

What is Serialisability?

the highest isolation level, where transactions are executed in a sequence such that the outcome is equivalent to some serial execution of the transactions

27
New cards

What is a Cascading Abort?

the abort of one transaction causes several other transactions to be aborted, especially when they have read uncommitted data from the aborted transaction

28
New cards

What is a Read-Write Conflict?

one transaction reads a data item and another writes to the same item simultaneously

29
New cards

What is a Write-Write Conflict?

two transactions attempt to write to the same data item simultaneously

30
New cards

What is a Lost Update?

one transaction's update is overwritten by another's update, leading to data inconsistency

31
New cards

What is a Dirty Read?

a transaction reads uncommitted changes made by another transaction, potentially leading to inconsistencies if the latter transaction aborts