HAN X X,XIAO F,HUANG S J,et al. Research on the implementation method of lock-free mechanism in DAG task synchronization[J]. Microelectronics & Computer,2023,40(6):9-16. doi: 10.19304/J.ISSN1000-7180.2022.0457
Citation: HAN X X,XIAO F,HUANG S J,et al. Research on the implementation method of lock-free mechanism in DAG task synchronization[J]. Microelectronics & Computer,2023,40(6):9-16. doi: 10.19304/J.ISSN1000-7180.2022.0457

Research on the implementation method of lock-free mechanism in DAG task synchronization

  • With the development of multi-core embedded real-time systems, the DAG task synchronization problem has received extensive attention. Most of the current task synchronization methods use the lock mechanism, but there are many problems in the lock mechanism, such as the spin lock in the task busy waiting state, which wastes CPU resources; If a task using a mutex cannot obtain a shared resource, it will be blocked, resulting in context switching overhead; Sequential locks allow write tasks to have higher priority, but write tasks cannot update data frequently, otherwise read tasks will starve to death. If the above lock mechanism is applied to the synchronization of DAG tasks on a multi-core platform, it will not only affect the overall execution efficiency of the system, but also cause subsequent tasks to fail to execute, and in severe cases, will lead to deadlocks and system crashes. Therefore, the DCAS lock-free mechanism is used in the DAG task synchronization process, and the while condition is used to avoid the ABA problem. Under the LITMUSRT multi-core platform, taking multitasking to apply, fill and release Vxworks network buffers at the same time as an example, the triplet mBlk, clBlk, and cluster in the buffer pool respectively use the DCAS lock-free mechanism. The experimental results show that compared with the traditional lock mechanism, the DCAS lock-free mechanism has a better effect in DAG task synchronization, the response time is reduced by 10.4%, and the overall execution efficiency of the system is improved by 4.2%.
  • loading

Catalog

    Turn off MathJax
    Article Contents

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return