Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose we have a transaction T that is a function which runs “forever,” and at

ID: 3841548 • Letter: S

Question

Suppose we have a transaction T that is a function which runs “forever,” and at each hour checks whether there is a PC that has a speed of 3.5 or more and sells for under $1000. If it finds one, it prints the information and terminates. During this time, other transactions that are executions of one of the four programs described in Exercise 6.6.1 may run. For each of the four isolation levels — serializable, repeatable read, read committed, and read uncommitted — tell what the effect on T of running at this isolation level is.

Explanation / Answer

Isolation Levels :
Serializable : With a lock-based concurrency control serializability requires read and write locks to be released at the end of the transaction.When using non-lock based concurrency control, no locks are acquired; however, if the system detects a write collision among several concurrent transactions, only one of them is allowed to commit.
Here the Transaction T,has to acquire locks before reading and writing. So, there will be no impact of other processess running.
              
Repeatable reads : With a lock-based concurrency control this keeps read and write locks until the end of the transaction.Write skew is possible at this isolation level, a situation where two writes are allowed to the same column in a row by two different writers, resulting in the row having data that is a mix of the two transactions.
Here the Transaction T,has to acquire locks before reading and writing. So, there will be no impact of other processess running.

Read committed : a lock-based concurrency control this keeps write locks until the end of the transaction, but read locks are released as soon as the SELECT operation is performed. Read committed is an isolation level that guarantees that any data read is committed at the moment it is read. It simply restricts the reader from seeing any intermediate, uncommitted, 'dirty' read.
Here the data read by Transaction T will always be commited so there should be no issue with other process.

Read uncommitted : This is the lowest isolation level. In this level, dirty reads are allowed, so one transaction may see not-yet-committed changes made by other transactions.
Here it could be a situation where data updated by other transactions are not available and the Transaction T keeps running for ever.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote