Reproducibility of results of a multithreaded Java application

Discussion in 'Java' started by I. Farbe, Jan 17, 2006.

  1. I. Farbe

    I. Farbe Guest

    Hello,

    I have inherited a complex multithreaded Java app about a year ago. It
    continuously reads input data from a file and updates some data
    objects. These data objects are then used by decision-making classes
    running on parallel threads. Yet another thread is used to
    continuously check the state of the decision-making classes and produce
    output based on the combined state.
    There were some deadlock issues that I was able to fix. There may
    still be some thread contention issues.
    My question is following: Assuming that all threading issues are
    resolved, is it possible for an application like the one described
    above to always produce the same output when given the same input.
    As it runs now, the output of the identical runs matches about 85% -
    90%, so I am trying to figure out whether the discrepancy is due to yet
    uncovered bugs in the system, or if it's an expected Java behavior.

    Thank you in advance for any insight
    I. Farbe, Jan 17, 2006
    #1
    1. Advertising

  2. opalinski from opalpaweb, Jan 17, 2006
    #2
    1. Advertising

  3. I. Farbe wrote:
    > I have inherited a complex multithreaded Java app about a year ago. It
    > continuously reads input data from a file and updates some data
    > objects. These data objects are then used by decision-making classes
    > running on parallel threads. Yet another thread is used to
    > continuously check the state of the decision-making classes and produce
    > output based on the combined state.
    > There were some deadlock issues that I was able to fix. There may
    > still be some thread contention issues.
    > My question is following: Assuming that all threading issues are
    > resolved, is it possible for an application like the one described
    > above to always produce the same output when given the same input.
    > As it runs now, the output of the identical runs matches about 85% -
    > 90%, so I am trying to figure out whether the discrepancy is due to yet
    > uncovered bugs in the system, or if it's an expected Java behavior.


    Given the generality of your actual question, I'd have to say, yes, it's
    possible that a program such as you describe could have the property
    that it always produces the same output from any given input. That
    doesn't actually tell you, however, whether the differences you observe
    in the outputs of your /particular/ program are the result of
    unidentified bugs. It seems a strange angle from which to approach the
    question, though; is not the uniqueness of the solution a characteristic
    of the problem the program solves? If there are multiple correct
    solutions then your program may be accurately modeling the problem
    domain, but if your program produces multiple distinct(*) solutions when
    there should only be one then it is clearly buggy.

    * Note that solutions that are not identical may nevertheless not be
    meaningfully distinct.

    --
    John Bollinger
    John C. Bollinger, Jan 18, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pavils Jurjans
    Replies:
    7
    Views:
    553
    John Saunders
    Jun 2, 2004
  2. Robert Brown
    Replies:
    5
    Views:
    478
    Harald Hein
    Jul 31, 2003
  3. Michael Zhang
    Replies:
    2
    Views:
    860
    Eric Brunel
    Oct 14, 2004
  4. Alan Kemp
    Replies:
    2
    Views:
    455
    Christoph Zwerschke
    Nov 23, 2005
  5. Replies:
    3
    Views:
    277
    Keith Thompson
    Mar 17, 2006
Loading...

Share This Page