> What is supposed to happen is that the high priority thread should get
> all the resources it needs because our prime directive is collecting
> data. If we lose data (because our buffer overflowed before the thread
> processed it), we might as well go home, since we can't do anything
> else without data.
>
> There is a case that the computer we're running on is just too slow so
> the buffer (that our driver fills and our high priority thread
> empties) overflows. We mark the data as incomplete and continue as
> best we can (While recommending that the user get a faster computer).
> That works ok, but it is a last resort.

Should the data be processed in real time?  IOW, can't you persist the
buffers to a file for later processing if it's going to overflow?

> There is another case where one of the other worker threads needs to
> supply a file handle to the high priority thread, but is starved and
> isn't ready in time. At that time we block the high priority thread
> until the file is ready because there is no place to put the data. We
> hope that the buffer won't fill up before the thread comes back, but
> if it does, it is just like the case above.

Well, I think that might also cause you lose data.  Can't the file handle be
allocated in advance, maybe?

Please forgive me if my comments seem stupid.  I'm doing the best I can to
guess my way through what you're doing!  :-)

-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

Do ever what you will - but first be such as can will.
-Thus Spoke Zarathustra, F. W. Nietzsche





Reply via email to