A race problem in driver development.

Hi , Is there any good method to test the race condition when develop device driver. such as many tasks access a device in the mean time.

Reply to
leilei
Loading thread data ...

Op Fri, 31 Oct 2008 08:19:01 +0100 schreef leilei :

Use a server task to serialize access to the device and define a messenging API for the device users.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

No. Race conditions can't reliably be found by any finite amount testing --- the odds are just too high that you never actually trigger it.

Race conditions have to be culled long before testing. You have to design your code such that you're *sure* it can't have race conditions. Yes, that can be hard, but it's the only way.

Reply to
Hans-Bernhard Bröker

There is no and there can't be a good method to prove for no race condition. A race condition is the architectural problem. It should be identified and carefully avoided at the design stage.

Vladimir Vassilevsky DSP and Mixed Signal Consultant

formatting link

Reply to
Vladimir Vassilevsky

The odds of your Most Obnoxious Customer finding it, however, are high.

So kill it before it's born.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

It's also much easier than tracking an intermittent glitch thru multiple pages of hazily connected code. If something can be accessed in multiple places, look at it carefully and protect those accesses. Buffer loading and unloading is probably the most common problem.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.