Schedule
A series of operations from one transaction to another transaction is known as a schedule. It is used to preserve the order of the operation in each individual transaction.
1. Serial Schedule
The serial schedule is a type of schedule where one transaction is executed completely before starting another transaction. In the serial schedule, when the first transaction completes its cycle, then the next transaction is executed.
For example: Suppose there are two transactions T1 and T2 that have some operations. If it has no interleaving of operations, then there are the following two possible outcomes:
- Execute all the operations of T1 which was followed by all the operations of T2.
- Execute all the operations of T1 which was followed by all the operations of T2.
- In the given (a) figure, Schedule A shows the serial schedule where T1 is followed by T2.
- In the given (b) figure, Schedule B shows the serial schedule where T2 is followed by T1.
2. Non-serial Schedule
- If interleaving of operations is allowed, then there will be a non-serial schedule.
- It contains many possible orders in which the system can execute the individual operations of the transactions.
- In the given figure (c) and (d), Schedule C and Schedule D are the non-serial schedules. It has interleaving of operations.
3. Serializable schedule
- The serializability of schedules is used to find non-serial schedules that allow the transaction to execute concurrently without interfering with one another.
- It identifies which schedules are correct when executions of the transaction have to interleave their operations.
- A non-serial schedule will be serializable if its result is equal to the result of its transactions executed serially.
Here,
Schedule A and Schedule B are serial schedules.
Schedule C and Schedule D are Non-serial schedules.
0 comments:
Post a Comment
Thanks