1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Java or C++ - Threads HELP

  1. Dec 4, 2008 #1
    Java or C++ - Threads HELP!!!!

    I need help with this program. I got five others to do and I won't have time to do it and it's apart of my final exam for next Tuesday, can somebody write this program:

    Create 5 threads which share a file and
    let "even" threads write to a file, and let "odd" delete from a file.
    Cycle 5 threads for 10 times. Make sure final file gives correct output. (no race conditions)

    Please help me out can someone write the program!!!


    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
    Last edited: Dec 5, 2008
  2. jcsd
  3. Dec 4, 2008 #2
    Re: Java or C++ - Threads HELP!!!!

    What exactly is your question? "Help me out" is not a very specific request.

    The problem described appears to basically be a funny way of saying "Demonstrate you know how to use a mutex". The file described is a resource which needs to be protected by a mutex. The threads perform operations on this resource which they should hold the mutex in order to perform.
     
  4. Dec 5, 2008 #3
    Re: Java or C++ - Threads HELP!!!!

    my question was can someone write this program, I just finished this phat *** program last night and I still got two more to go
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Java or C++ - Threads HELP
  1. Java Help (Replies: 6)

  2. JAVA ArrayList help (Replies: 5)

Loading...