DAG任务同步中无锁机制实现方法研究  

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

在线阅读下载全文

作  者:韩星星 肖锋[1] 黄姝娟[1] 张文娟 陈术山 李天森 HAN Xingxing;XIAO Feng;HUANG Shujuan;ZHANG Wenjuan;CHEN Shushan;LI Tiansen(School of Computer Science and Engineering,Xi’an Technological University,Xi’an 710021,Shaanxi,China;Basic College,Xi’an Technological University,Xi’an 710021,Shaanxi,China)

机构地区:[1]西安工业大学计算机科学与工程学院,陕西西安710021 [2]西安工业大学基础学院,陕西西安710021

出  处:《微电子学与计算机》2023年第6期9-16,共8页Microelectronics & Computer

基  金:国家自然基金面上项目(62171361),陕西省重点研发计划一般项目(2022GY-119);陕西省科技厅自然科学基础研究计划(2021JM-440);陕西省西安市未央区科技项目(201925)。

摘  要:随着多核嵌入式实时系统的发展,DAG任务同步问题得到了广泛的关注.目前的任务同步方法大都采用锁机制,但锁机制存在许多问题,如自旋锁存在任务忙等状态,浪费CPU资源;使用互斥锁的任务若获取不到共享资源会被阻塞,产生上下文切换开销;顺序锁允许写任务有更高的优先级,但写任务不能频繁更新数据,否则读任务会产生饿死现象.上述锁机制如果应用于多核平台下的DAG任务同步,不仅会影响系统整体执行效率,导致后继任务无法执行,严重时会引发死锁现象导致系统崩溃.因此,提出了在DAG任务同步过程中使用DCAS无锁机制,有效避免了锁机制存在的问题.在LITMUSRT多核平台下,以多任务同时申请、填充和释放Vxworks网络缓冲区为例,对缓冲池中的三元组mBlk,clBlk,cluster分别使用DCAS无锁机制.实验结果表明,相比传统锁机制,DCAS无锁机制在DAG任务同步方面有较好的效果,响应时间减少了10.4%,系统的整体执行效率提高了4.2%.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%.

关 键 词:多核嵌入式实时系统 任务同步 DAG任务 锁机制 DCAS无锁机制 

分 类 号:TP302[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象