The application discloses a real-time task scheduling method and
system based on an
industrial Internet of Things, and a medium, the method comprising: taking a heterogeneous two-level
bitmap structure as a unique carrier of task priority and readiness state, incorporating corresponding heterogeneous two-level
bitmap search fixed overhead, and completing provable real-time
admission control of a newly-built task through a
response time iteration criterion; a ready task that passes the provable real-time
admission control completes heterogeneous two-level
bitmap search within a limited
clock cycle; when the heterogeneous two-level bitmap search identifies
mutual exclusion lock competition and
priority inversion risk, a deterministic bitmap migration protocol is executed through a processor atomic instruction, the readiness
queue is physically migrated at the moment when priority inheritance takes effect through the deterministic bitmap migration protocol, the problem of inheritance taking effect but scheduling lagging is eliminated, and the response certainty of a control task in a resource competition scene is ensured.