Lock strategy adjustment method based on lock scheduling condition and terminal
By predicting the contention degree of locks in real time and adjusting the lock strategy dynamically, the lock competition problem of lock scheduling and concurrent control in the Linux kernel is solved, and the balance between high performance and fairness is achieved, and the system stability and responsiveness are improved.
Patent Information
- Application Number
- CN202411509586.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2025-03-18
AI Technical Summary
Lock scheduling and concurrent control in the existing Linux kernel have problems such as CPU idle caused by lock competition, long resource waiting time, and the difficulty of traditional static strategies to adapt to dynamically changing workloads.
By acquiring historical system running data, the machine learning model is trained to predict the contention degree of locks in real time, and dynamically adjust the lock's scheduling strategy based on the prediction results, including adjusting the spin number of spins of the spin lock, the priority strategy of the read and write lock, and the spin number of the mutex lock or converting it into a blocking lock.
The lock scheduling strategy is optimized, unnecessary spin and context switching is reduced, CPU usage efficiency is improved, and the overall stability and response ability of the system are improved.