Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: KayEyeDoubleDee
Whoops. This is the part that I've never had trouble with...

Suppose you've got n threads, each keeping tabs on mission critical pieces of data, and suppose each of the n threads can be in m possible states. That gives you n sets of mission critical data in n*m possible states. Suppose further that there might be inter-relationships among the n*m states: If thread i is in state u, then that effects the behavior of thread j, which is in state v.

Now suppose you decide to shut the whole thing down: You've got to send n "kill" signals to each of the threads, and the way each thread responds to the kill signal depends on some possibly fantastically complicated logic describing the state of the relationships between the n threads and their m possible states.

If you're not careful, it's real easy to construct a house of cards where putting thread zero to sleep causes the whole thing to go crazy, and much of your mission-critical data gets lost in the shuffle, or gets overwritten with garbage [or you turn off the patient's ventilator, or you shut down the nuclear power plant's cooling system, or you alter the ICBM's launch status from comatose to pre-launch countdown...].

51 posted on 02/24/2004 9:43:55 AM PST by mosel-saar-ruwer
[ Post Reply | Private Reply | To 49 | View Replies ]


To: mosel-saar-ruwer
Like I said, I've never had this problem. Its possible that m threads have n states, each with different reactions to a shutdown event, but, in my experience, not very likely.
52 posted on 02/24/2004 12:20:05 PM PST by KayEyeDoubleDee (const tag& constTagPassedByReference)
[ Post Reply | Private Reply | To 51 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson