The present invention discloses a concurrent
programming method and device based on
software transaction memory. It belongs to the technical field of
computer programming. The concurrent
programming method based on
software transaction memory designed by the present application is based on a high-speed cache
hardware structure that supports exchangeable update
perception, supports
transaction processing of exchangeable update operations, and dynamically maintains the serial execution graph of sub-transactions, judges the serializability of sub-transactions at the transaction
commit node, and enhances the
concurrency in the transaction execution process; and concurrently executes sub-transactions and parent transactions based on the characteristics of Future asynchronous
programming, reduces the strong correlation between the execution of parent and child transactions, reduces the possibility of transaction
rollback and the failure of transaction execution; in addition, provides a variety of parent transaction
commit strategies, and the blocking waiting strategy can avoid the problem of global observation inconsistency; the independent
commit strategy can improve the efficiency of transaction execution and reduce the scope of influence of transaction
rollback.