由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - is it possible to generate random tests for semphore/mutex/event APIs ... ?
相关主题
连续release mutex/semphore 2次有什么问题吗?好了,现在可以发布我的发明之一了,物联网App Engine
Multi-thread可以mutex锁资源,Multi-process怎么锁资源?Python pandas 是坑不?
Dummy DB question: create user时,DB自己会lock/sync吧FP有的,Python都有!
问个线程同步的问题我的DBA在生成ORACLE table的时候需要一个一个column看 (转载)
waiting for N condition variables in linux请教unit test的best practice
请教 boost locksip问题
多线程的程序设计有什么好书推荐? (转载)[help] how do I improve my coding quality?
请xiaoju和digua来讲讲COM技术吧Java 问题,请教如何找出一个array里的duplicate segments?
相关话题的讨论汇总
话题: mutex话题: semphore话题: thread话题: random话题: generate
进入Programming版参与讨论
1 (共1页)
w*s
发帖数: 7227
1
our product is OS, so provide these IPC calls,
can i generate random tests for them ?
say i generate random number of threads,
thread 1 creates and gets a mutex,
thread 2 has to wait for it.
The above case is simple, how about nested case,
thread 1 creates and gets a mutex, then i has to wait for an event from
another thread...
Q1: what are the constrains ? the only one i know is thread 2 has to wait
for
the mutex, only after mutex gets created.
Q2: How complicate can this go ? inside mutex block , there's a semphore ...
thanks !
b******n
发帖数: 592
2
I had same issues before. It is very difficult to really test mutex.
valgrind may help. My solution was to mock mutexes, and hand craft 'senarios
' for testing. Then have a very long test with random executions.

【在 w*s 的大作中提到】
: our product is OS, so provide these IPC calls,
: can i generate random tests for them ?
: say i generate random number of threads,
: thread 1 creates and gets a mutex,
: thread 2 has to wait for it.
: The above case is simple, how about nested case,
: thread 1 creates and gets a mutex, then i has to wait for an event from
: another thread...
: Q1: what are the constrains ? the only one i know is thread 2 has to wait
: for

1 (共1页)
进入Programming版参与讨论
相关主题
Java 问题,请教如何找出一个array里的duplicate segments?waiting for N condition variables in linux
请教一个算法题关于shortest path的请教 boost locks
C++ Q88: nested non-template class (转载)多线程的程序设计有什么好书推荐? (转载)
gmail越发难用为毛wildcard之类的search至今不能用?请xiaoju和digua来讲讲COM技术吧
连续release mutex/semphore 2次有什么问题吗?好了,现在可以发布我的发明之一了,物联网App Engine
Multi-thread可以mutex锁资源,Multi-process怎么锁资源?Python pandas 是坑不?
Dummy DB question: create user时,DB自己会lock/sync吧FP有的,Python都有!
问个线程同步的问题我的DBA在生成ORACLE table的时候需要一个一个column看 (转载)
相关话题的讨论汇总
话题: mutex话题: semphore话题: thread话题: random话题: generate