A forum for Spin users
You are not logged in.
can any body send the example program in C which have dead lock error and can be identify by using SPIN. thanks
Offline
I don't have one. But, you can write a simple one that does the following: Proc-1 acquires mutex-A and mutex-B. Proc-2 acquires mutex-B and mutex-A. If you try to model this in SPIN, yes, SPIN indeed will throw an error when you verify the model for safety (and you can replay the error trail to see - where two processes are - causing the deadlock). If your intent is not to use embedded C or model extraction from C program, you can directly model this in PROMELA and try SPIN on it.
Last edited by awesan (2012-01-12 19:24:14)
Offline