) 数据竞争 当顺序执行程序变成并行执行程序时,数据竞争(Data races)是出现频率最高的 问题。当你开发顺序执行的代码时,代码的执行通常是建立在各种不同的假定上 的。
基于182个网页-相关网页
和高级操作不同的是,内部的并行操作并不安全,它可能造成数据争用(data races)的情况.还有,如果调用这个内部操作的高级函数出于某种原因不能被编译成并行操作的话,这个内部操作也会失败.
基于40个网页-相关网页
Given the multi-threaded program dynamic data race fault detection system framework.
给出了多线程程序中数据竞争故障动态检测的系统框架。
参考来源 - 多线程程序中数据竞争故障的动态检测技术研究·2,447,543篇论文数据,部分数据来源于NoteExpress
Now, we would have created a data race on the local variable sum, because multiple threads might want to update it simultaneously.
现在,我们在局部变量sum上创造了一场数据竞争,因为多个线程可能同时希望更新它。
This addresses the data race, but has further costs for concurrency, since locking the entire list while iterating could block other threads from accessing the list for a long time.
这样做虽然解决了数据争用问题,但是在并发性方面付出了更多的代价,因为在迭代期间锁住整个list会阻塞其他线程,使它们在很长一段时间内不能访问这个列表。
A program with a data race is an incorrectly synchronized program.
一个有数据竞争的程序就是一个没有正确同步的程序。
应用推荐