Lock scheduling condition prediction method and terminal
Through the machine learning model, the performance and fairness balance of lock scheduling and concurrent control in the Linux kernel in a highly concurrent environment is solved, and efficient CPU usage and system stability is achieved.
Patent Information
- Application Number
- CN202411509152.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 concurrency control in the existing Linux kernel is difficult to efficiently balance performance and fairness in highly concurrent environments, resulting in CPU idleness, long resource waiting time and traditional static strategies that are difficult to adapt to dynamically changing workloads.
By acquiring historical system running data, machine learning models (such as random forest algorithms) are 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 read and write locks, and the spin and blocking strategy of the mutex lock.
It realizes intelligent prediction of lock contention degree, dynamic adjustment of lock strategies, reduce unnecessary spin and context switching, improve CPU usage efficiency, and improve the overall stability and response capabilities of the system.