GoConqr has a new look! Let us know what you think.

Notes

Untitled

SERGIO GUTIERREZ Database Systems English 1 page

Content of the notes (1)

Page 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)

Information

Description
Database Systems (11/15/17) Note on Untitled, created by SERGIO GUTIERREZ on 27/11/2017.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?