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.

CN119645673APending Publication Date: 2025-03-18CONTEMPORARY NEBULA TECH ENERGY CO LTD
0 Cites 0 Cited by

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

Technical Problem

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.

Method used

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.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

The invention relates to the technical field of lock scheduling prediction, in particular to a lock scheduling condition prediction method and a terminal, and the method comprises the steps: obtaining historically collected system operation data which comprises lock scheduling data, system load data and system scheduling overhead data; training a machine learning model according to the historically collected system operation data; predicting the contention degree of the lock in real time according to the trained machine learning model to obtain a prediction result; and adjusting the scheduling strategy of the lock according to the prediction result. According to the technical scheme, the contention degree of the lock can be intelligently predicted, then the lock strategy is dynamically adjusted, the balance between high performance and fairness is achieved, the optimization of the lock scheduling strategy is achieved, unnecessary spinning and context switching can be reduced, the CPU use efficiency is improved, and therefore the overall stability and response capacity of the system are improved.
Need to check novelty before this filing date? Find Prior Art