The invention provides a multi-task automatic
mutual exclusion lock management
middleware which realizes full-automatic lock management through intelligent resource classification, dynamic lock strategy matching and priority sensitive scheduling. The
middleware is internally provided with a resource feature analysis
algorithm, read-write features of resources such as hardware equipment and memory queues can be automatically recognized, and optimal lock mechanisms are allocated to different scenes in combination with a preset lock strategy
library; a priority preemptive scheduling
algorithm is originally created, high-priority tasks are allowed to break through the limitation of a lock waiting
queue, and the real-time task response capability is guaranteed; and meanwhile, an annular
deadlock detection module is integrated, and a low-priority lock occupation task is relieved through transaction
rollback, so that circular waiting is relieved. A developer only needs to
label task priority labels, zero manual lock coding can be achieved, and the lock conflict risk is reduced. The modules cooperate to achieve full-automatic lock management, lock conflict and
deadlock risks are remarkably reduced on the premise that lock logic does not need to be coded manually, and the real-time performance and reliability of a multi-task
system are remarkably improved.