Font Size: a A A

Decision Method Of Transaction Serializability Based On Priority Execution Relational Closure And Logic Formula Operations

Posted on:2020-08-16Degree:MasterType:Thesis
Country:ChinaCandidate:J Y WangFull Text:PDF
GTID:2428330590983826Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Nowadays,with the rapid development of network technology and efficient sharing of digital resources,database systems are also facing greater pressure of information processing.The database system has two main responsibilities.On the one hand,it should be able to share information resources as much as possible and strive to improve the efficiency of the system.On the other hand,the database system must ensure the accuracy and security of the data in the system.The transaction processing system of database can realize concurrent execution of multiple transactions,because the concurrent execution of transactions has many incomparable advantages compared with serial execution:First,the way transactions are executed concurrently can improve throughput and resource utilization efficiency.A transaction consists of several operations.Some operations are computations that require CPU resources,while others operate on the database for read and write,that is,disk I/O.The two resources are independent,so if one transaction performs a read or write operation,the CPU and the I/O system can operate in parallel.This method greatly improves the system throughput and disk utilization in computer systems.Second,the way in which transactions are executed concurrently also reduces user wait time.The transactions that run in the database system are various.Some transactions are very long,such as generating a complex report;some transactions are very short,and may only be a simple query.When a short transaction encounters a long transaction,if it cannot be executed concurrently,it is necessary to wait for the long transaction to complete before it can be executed.This wait is unpredictable,and the user may be very annoyed and unanimously unacceptable.Concurrency execution can avoid such things happening and reduce the average response time of the query.However,in fact,most concurrent scheduling will lead to inconsistent database state.People call such concurrent scheduling an incorrect concurrent scheduling.The wrong concurrent scheduling will cause the database system to fail.Concurrency operations with databases often result in three problems.First,when two transactions write to the same database,the operation of the previous transaction on the database will be overwritten by the modification of the database by the latter transaction.This problem is called "missing modification." Secondly,concurrent scheduling errors can result in non-repeatable reads,ie transaction T1 needs to read the same data item A twice,but in the gap between two read operations,another transaction T2 changes the value of A,causing T1 to read twice.Different values are read for the same data item A.Also,when a transaction is executed concurrently,if a transaction reads another data that does not successfully execute the transaction,it will result in "dirty reads" and damage the integrity of the database.Lost modification,non-repeatable read,dirty read,etc.will cause great damage to the database.To ensure the consistency of concurrent transactions,a serializable concept is proposed.If a concurrent scheduling of a transaction has the same effect on the state of the database as a serial scheduling,then this concurrent scheduling can also ensure the consistency of the database state.Such concurrent scheduling is the scheduling that people are looking for and correctly executed.We put such a scheduling.Called serializable or serializable scheduling.Modern database transaction processing system allows multiple transactions to execute concurrently at the same time,which puts forward new requirements for database system.It requires concurrent control parts of database system to judge concurrent scheduling,execute scheduling that can be executed concurrently,and refuse scheduling that cannot be executed concurrently.This can effectively ensure that the data in the database is always in a consistent state,which requires that transactions executed concurrently must be serializable.One of the important tasks of transaction management in database system is to detect serializability of transactions,which is an effective means to ensure efficient and correct concurrent execution of multiple transactions in database system.The main function of detecting serializability of transactions is to coordinate the relationship between multipletransactions accessing the same database file at the same time,to prevent conflicts between transactions executed concurrently,to allow serializable scheduling and concurrent execution,and not to allow non-serializable scheduling and concurrent execution.When the number of transaction schedules is small,we can check the order of any two conflicting operations in a schedule and determine if they are in the same order as the transactions in the conflict-equivalent serial schedule.If they are the same,it means that the schedule is serializable.However,when the number of transaction schedules is more complicated,it is more complicated to judge whether the transaction schedule satisfies the serializable condition.Starting from the algebraic method of relational operations,this paper proposes a closure operation based on the transaction execution priority relationship and the calculation of the joint logic formula thus established,and verifies the serialization of concurrent transactions through logical decision.Through the theorem proving and case verification,the proposed algebraic method based on logic formula achieves the same effect as the execution graph decision,and the judgment is more intuitive and easier to operate.It does not need to establish the graph model and whether the detection loop appears in the graph search.Using the logical formula of transaction execution priority relationship to determine serialization has made a breakthrough contribution in reducing the number of transaction conflict detection,which is conducive to improving transaction concurrency,at the same time,it can ensure the serialization of transaction scheduling,and has a certain role in improving system performance.
Keywords/Search Tags:database, concurrent transaction, serializable judgment, priority relationship, closure calculation, logical formula
PDF Full Text Request
Related items