<< Chapter < Page Chapter >> Page >

Since we have not fully specified this example's original system, we will leave the details to the reader's imagination.

The lost pathfinder (optional)

In 1997, the Mars Pathfinder seemed to beam its data back to Earth just fine, exceptsometimes it would appear to freeze up. Thefix? Press Control-Alt-Delete from Earth, and re-boot its rover(incurring not only an expensive delay for Mission Control, but the full attention of late-night-TV comedians).

The cause turned out to be a bug in the concurrency protocol, between a low-priority data-gathering mode, which was meantto yield to a high-priority data-sending mode. However, sometimes these priorities would become inverted,with the high-priority thread blocking on the (supposedly) low-priority one. (More detail.) The bug

This is of course not the full Sojourner Rover code, but it is the concurrency-protocol skeleton.The other thousands of lines of code would, of course, be omitted from a Promela prototype.
can be realized in Promela: 1 /* From Spin primer/manual, Gerard Holzman. */ 23 mtype = { free, busy }; /* states for the variable "mutex" */ 4 mtype = { idle, waiting, running } /* states for the processes */5 6 mtype highProc = idle;7 mtype lowProc = idle; 8 mtype mutex = free;9 10 active proctype high_priority()11 { 12 end:13 do 14 :: highProc = waiting;15 atomic { 16 mutex == free ->17 mutex = busy 18 };19 highProc = running; 20 /* work work work; produce data */21 atomic { 22 highProc = idle;23 mutex = free 24 }25 od 26 }27 28 active proctype low_priority() provided (highProc == idle)29 { 30 end:31 do 32 :: lowProc = waiting;33 atomic { 34 mutex == free ->35 mutex = busy 36 };37 lowProc = running; 38 /* work work work; consume data and send it back to Earth. */39 atomic { 40 lowProc = idle;41 mutex = free 42 }43 od 44 }45 4647 /* Note the "provided" clause as part of low_priority()'s declaration. 48 * This condition is monitered and confirmed before every single49 * transition that low_priority() attempts. 50 * (This is a handier syntax than placing that guard condition51 * in front of every single statement within the process.) 52 */

Can you detect the problem using SPIN?

Non-progress: livelock, starvation, and fairness


As described previously , livelock is very similar to deadlock. But in livelock, computation doesn't get completely stuckit simply doesn't do anything sufficiently interesting.

In previous examples, processes waited with a guarded statement. Here, as an example of busy waiting , we repeatedly check for thedesired condition, and otherwise do something. Busy waiting for a condition that never comes true is one commonsituation that leads to livelock. 1 show int x = 1; 23 active[2] proctype busywait()4 { 5 do6 :: x != 0 ->7 printf( "%d waiting.\n", _pid ); 8 :: else ->9 break; 10 od;11 12 printf( "Now this is more interesting.\n" );13 } This example also uses _pid , a read-only variable whose value is the process ID number (0-based) of the given process.

Questions & Answers

Do somebody tell me a best nano engineering book for beginners?
s. Reply
what is fullerene does it is used to make bukky balls
Devang Reply
are you nano engineer ?
what is the Synthesis, properties,and applications of carbon nano chemistry
Abhijith Reply
so some one know about replacing silicon atom with phosphorous in semiconductors device?
s. Reply
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
how to fabricate graphene ink ?
for screen printed electrodes ?
What is lattice structure?
s. Reply
of graphene you mean?
or in general
in general
Graphene has a hexagonal structure
On having this app for quite a bit time, Haven't realised there's a chat room in it.
what is biological synthesis of nanoparticles
Sanket Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
types of nano material
abeetha Reply
I start with an easy one. carbon nanotubes woven into a long filament like a string
many many of nanotubes
what is the k.e before it land
what is the function of carbon nanotubes?
I'm interested in nanotube
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
preparation of nanomaterial
Victor Reply
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
Himanshu Reply
good afternoon madam
what is system testing
what is the application of nanotechnology?
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
anybody can imagine what will be happen after 100 years from now in nano tech world
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
silver nanoparticles could handle the job?
not now but maybe in future only AgNP maybe any other nanomaterials
I'm interested in Nanotube
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
can nanotechnology change the direction of the face of the world
Prasenjit Reply
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
Ali Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Berger describes sociologists as concerned with
Mueller Reply
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Model checking concurrent programs. OpenStax CNX. Oct 27, 2005 Download for free at http://cnx.org/content/col10294/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Model checking concurrent programs' conversation and receive update notifications?