Conflicting operations in schedule, Database Management System

Conflicting Operations in Schedule:

The three simple ways of interleaved instruction implement of transactions T1 and T2. Please note that in the following tables the first column describes the sequence of instructions that are getting implemented that is the schedule of operations.

a)      T2 is implemented completely before T1 starts, then sum X+Y will show the correct assets

 

Schedule

Transaction T1

Transaction T2

Example

Values

Read X

 

Read X

X = 50000

Read Y

 

Read Y

Y= 100000

Display X+Y

 

Display X+Y

150000

Read X

Read X

 

X = 50000

Subtract 100

Subtract 100

 

49900

Write X

Write X

 

X = 49900

Read Y

Read Y

 

Y= 100000

Add 100

Add 100

 

100100

Write Y

Write Y

 

Y= 100100

 

b)      T1 is implemented completely before T2 starts, then sum X+Y will still show the correct assets:

 

Schedule

Transaction T1

Transaction T2

Example

Values

Read X

Read X

 

X = 50000

Subtract 100

Subtract 100

 

49900

Write X

Write X

 

X = 49900

Read Y

Read Y

 

Y= 100000

Add 100

Add 100

 

100100

Write Y

Write Y

 

Y= 100100

Read X

 

Read X

X = 49900

Read Y

 

Read Y

Y= 100100

Display X+Y

 

Display X+Y

150000

 

c)   Block A in transaction T1 is implemented, followed by complete execution of T2, followed by the Block B of T1.

Schedule

Transaction T1

Transaction T2

Example

Values

Read X

Read X

 

X = 50000

Subtract 100

Subtract 100

 

49900

Write X

Write X

 

X = 49900

Read X

 

Read X

X = 49900

Read Y

 

Read Y

Y= 100000

Display X+Y

 

Display X+Y

149900

Read Y

Read Y

 

Y= 100000

Add 100

Add 100

 

100100

Write Y

Write Y

 

Y= 100100

 

In this implement an incorrect value is being displayed. This is because Rs.100 although deleted from X, has not been put in Y, and is therefore missing. Obviously, if T1 had been written in a different way, starting with block B and following up with block A, even then such an interleaving would have given a dissimilar but incorrect result.

Please note that for the given transaction there are many more ways of this interleaved instruction implement.

Therefore, there may be a problem when the transactions T1 and T2 are allowed to implementation in parallel. Let us define the problems of concurrent implementation of transaction more precisely.

Let us suppose the following transactions (assuming there will not be errors in data while implementation of transactions)

Transaction T3 and T4: T3 reads the balance of account X and subtracts a withdrawal amount of Rs. 5000, while T4 reads the balance of account X and adds an amount of Rs. 3000

 

T3                                               T4

READ X                                    READ X

SUB 5000                                ADD 3000

WRITE X                                  WRITE X

Posted Date: 3/12/2013 1:46:56 AM | Location : United States







Related Discussions:- Conflicting operations in schedule, Assignment Help, Ask Question on Conflicting operations in schedule, Get Answer, Expert's Help, Conflicting operations in schedule Discussions

Write discussion on Conflicting operations in schedule
Your posts are moderated
Related Questions
State the terms Designing the database and Normalization Designing the database: Out of the ERD we have formed, it is very easy to verify the tables, the attributes which the

Explain Derived and Non-Derived Attribute? In few cases, two or more attribute values are related, for instance, Age and BirthDate attributes of a person. For specific person e

Relational Algebra is a set of basic operations used to influence the data in relational model. These operations allow the user to specify basic retrieval request. The result of re

Define Shared locks? Ans: Shared lock: Throughout concurrent execution of transactions, earlier than a transaction can access a data item, it has to obtain a lock on it. Now he

We require an advanced system for a Sports Centre, you are concerned only with representing the data discussed below about bookings and members. (The complete system may contain ot

What is a Database? To know what database is, we have to start from data, which is the basic building block of any DBMS. Data: Facts, figures, statistics etc. having no pa

Can a domain, assigned to a data element be changed? Yes.  We can do so by just overwriting the entry in the field domain.

Physical Database Design Issues The database design includes the process of logical design with the use of E-R diagram, normalisation, etc., followed by the physical design.

Create a Student database and Retrieve the names of all students majoring in ‘CS' Consider the following relational database: STUDENT (name, student#, class, major) COURSE (co

Boyce-Codd Normal Form (BCNF) The relation NEWSTUDENT (Enrolmentno, Sno, Sname, Cname, Cno,) has every attributes participating in candidate keys as all the attributes are assu