you would not believe that I am having the same problem , but right after reading your question I come with a Solution !!!
create a table in Database name it transaction_Control.
When Process 1 reads that table set a flag in that table.
Proces 1 Should send message to that table(transaction_Control) every a specific number of seconds ( say 10 seconds, ) and when process 1 complete unset that flag in that table.
Now process 2 before going to hit the the table should go to the "trascation_control" table and check the flag and if flag allows then go and hit the table( the Actuall data table).
Now if process 1 is get killed(crashes) in the middle , then who is going to clear the flag.
Write stored procedure in database that check the message from process 1 every specific number of seconds , and if last massege from the process 1 is tooo old ( you can find out by comparing last message time to system time )then clear the flag.
Now in this whole process if you think , is a kind of same sitution but the differnet is that trasaction of setting and unsetting a flag would not tooo long

). so wait state for process 2 would not be longer than milli seconds.

)).
try to implement this and see if it helps .

)
Faheem Rao