GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Ohne Titel

SERGIO GUTIERREZ Database Systems Englisch 1 Seite

Inhalt der Notizen (1)

Seite 1

User A and User B try to read X.

Say they are doing ATM updates.

A wants to add five dollars, x = x+ 5. This requires an update.

B wants to add ten dollars, x = x+10. This requires an update.

Look up Lost Update & Uncommitted Dependency on Book/Internet

Readlock (Sharedlock)

If you want to read, you must establish a read lock

Writelock

Exclusive lock if I want to write, I must establish a write lock

To set a read lock

If there are no write locks, I can set a read lock

To set a write lock,

If there are no locks except mines, I can put a write lock

If lock can't be set, wait. This applies to read and write locks.

Commits rollbacks and releases locks.

To solve these problems, we use Deadlock.

Look up the Dining Philosophers

3 Requirements of Dealock

Share of lockable resources

Non-premption: Have to wait, can't take fork from someone else

Circular wait

Every transaction receives a globally unique timestamp. No two time stamps are the same, one is bigger than the other.

A younger transaction has a bigger timestamp.

When request and item that is locked:

Wait and die - if A is older than B, A waits. Else A dies (rollback) restarts.

Wound and wait - if A is younger than B, A wounds B, which means B dies (rollback & restart)

Informationen

Beschreibung
Database Systems (11/15/17) Notiz am Ohne Titel, erstellt von SERGIO GUTIERREZ am 27/11/2017.
Erstellt von
SERGIO GUTIERREZ
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck