FIFO Proccess deadlocked



Hello,
I have the following problem:
Our system implements FIFO mechanisem by checking if the message is the
first in order (for our group by logic), if so process, if not delay for
specific time (100 ms in current production) and check again in a loop.
To illustrate the problem I'll describe a worst case scenario.
Suppose I receive 1000 messages which all of the same group by type, meaning
only one can be processed concurrently. So I suppose to have 999 messages in
a delay loop waiting for 1 message to finish.
The problem is that each message is catching a thread, and if I have for
example only 500 threads in the ThreadPool a deadlock situation is possible:
the message that should process is waiting for a free thread and all the
others who are catching threads are waiting for that one message to
process.

I hope I made it clear.

Any way I think the persistence mechanism (dehydration) should help me here
to free threads and let any one the chance to process.
The problem is that in my case the delay is implemented in a long runing
loop which set Thread.Sleep each time for a short time.
I don't see the dehydration mechanism is letting the desiered msg the
desiered thread.

10x


.



Relevant Pages

  • Re: INKEY /W hogs the CPU
    ... Possibly the "waiting" INKEY? ... So the loop is executed once a second and is waiting at INKEY 99% of the time. ... which calls __input which calls SysBeep18.2 times per second until the delay is ended. ...
    (comp.os.msdos.4dos)
  • Re: Write Signal on Disk II Question
    ... checked for sampling jitter using an oscilloscope? ... But I noticed another shocking thing: The timing loop I used to find ... the timing resolution is quite high, since the delay loop on the main ...
    (comp.sys.apple2)
  • Re: Write Signal on Disk II Question
    ... checked for sampling jitter using an oscilloscope? ... But I noticed another shocking thing: The timing loop I used to find ... the timing resolution is quite high, since the delay loop on the main ...
    (comp.sys.apple2)
  • Re: Write Signal on Disk II Question
    ... checked for sampling jitter using an oscilloscope? ... But I noticed another shocking thing: The timing loop I used to find ... the timing resolution is quite high, since the delay loop on the main ...
    (comp.sys.apple2)
  • Re: Write Signal on Disk II Question
    ... checked for sampling jitter using an oscilloscope? ... But I noticed another shocking thing: The timing loop I used to find ... the timing resolution is quite high, since the delay loop on the main ...
    (comp.sys.apple2)

Loading