华东师范大学学报(自然科学版) ›› 2024, Vol. 2024 ›› Issue (5): 152-161.doi: 10.3969/j.issn.1000-5641.2024.05.014

• 教育数据管理 • 上一篇    下一篇

基于锁避免的事务内阻塞分析与调度策略

凌向荣, 翁思扬, 张蓉*()   

  1. 华东师范大学 数据科学与工程学院, 上海 200062
  • 收稿日期:2024-07-04 接受日期:2024-07-31 出版日期:2024-09-25 发布日期:2024-09-23
  • 通讯作者: 张蓉 E-mail:rzhang@dase.ecnu.edu.cn
  • 基金资助:
    国家自然科学基金 (62072179)

Blocking analysis and scheduling strategy in transactions based on lock-avoidance

Xiangrong LING, Siyang WENG, Rong ZHANG*()   

  1. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
  • Received:2024-07-04 Accepted:2024-07-31 Online:2024-09-25 Published:2024-09-23
  • Contact: Rong ZHANG E-mail:rzhang@dase.ecnu.edu.cn

摘要:

在现代教育环境中, 高效且可靠的数据管理系统对于在线教育平台和学生信息管理系统的运行至关重要. 随着教育数据量的持续增长和多用户访问频率的提高, 数据库系统面临并发冲突操作带来的高吞吐要求的挑战. 在众多并发控制策略中, 基于锁的控制策略是数据库系统中常用的策略之一, 然而, 由于锁造成的阻塞会影响数据库中事务并发执行的性能. 现有的工作主要通过调度事务间执行顺序或优化存储过程等方法减少锁竞争. 为了进一步提升事务吞吐, 本文基于锁避免进行事务内的阻塞分析和代价建模, 并提出事务内调度策略, 通过对工作负载的阻塞分析预估调度代价, 然后根据一定规则在事务内部有限程度地交换操作顺序, 减少锁阻塞造成的延迟, 从而提高性能. 最后, 通过对比传统的调度策略, 验证了提出的调度策略对吞吐的提升及对事务平均延迟的降低的效果.

关键词: 锁调度, 并发控制, 事务调度, 联机事务处理

Abstract:

In the modern educational environment, efficient and reliable data management systems are essential for the operation of online education platforms and student information management systems. With the continuous growth of educational data and the increase in the frequency of multi-user access, database systems face the challenge of high throughput requirements owing to concurrent conflict operations. Among the many concurrency control strategies, the lock-based control strategy is commonly used in database systems. However, the blocking caused by locks affects the performance of concurrent execution of transactions in the database. Existing work mainly reduces lock contention by scheduling the execution order between transactions or optimizing stored procedures. To improve transaction throughput further, this study conducts blocking analysis and cost modeling within transactions based on lock avoidance, and proposes an intra-transaction scheduling strategy. The scheduling cost is estimated by analyzing the blocking of the workload, and then the operation order is exchanged to a limited extent within the transaction according to certain rules to reduce the delay caused by lock blocking, thereby improving performance. Finally, comparing the conventional and proposed scheduling strategies, the latter is verified to improve throughput and reduce the average transaction delay.

Key words: lock scheduling, concurrency control, transaction scheduling, on-line transaction processing

中图分类号: