Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: PARALLEL PROGRAMMING HELP PLEAAASE! :(

  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PARALLEL PROGRAMMING HELP PLEAAASE! :(

    You are to write a parallel program that will receive a large array of unsorted integers containing digits from 0 to 99. The program will have to calculate the SUM and AVERAGE of ODD number digits between 25 and 75 (inclusive).
    The user may specify the size or the array and the total processor that the machine has. The size of the array must be divisible by number of processor. Based on the given size, the computer will generate random integer numbers automatically to populate the array.
    The program should display the status of the calculation for each processor. The result should be displayed after all calculations are completed.Error messages should be displayed appropriately

    a) Write a sequential (non-parallel) program that will accomplish above task.
    b) Write a concurrent (parallel) program that will produce the result of the above task.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,360
    Thanks
    49
    Thanked 2,206 Times in 2,179 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    What have you tried?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,051
    My Mood
    Mellow
    Thanks
    184
    Thanked 650 Times in 637 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    Interesting assignment to study/exercise concurrency in Java. Please show us your progress and ask for help when needed.

  4. #4
    Junior Member
    Join Date
    Jun 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    nothing as such..
    Can u do the (b) part for me?

  5. #5
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,051
    My Mood
    Mellow
    Thanks
    184
    Thanked 650 Times in 637 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    Can u do the (b) part for me?
    No, we can't. What's preventing you from getting a start on it? In fact, if you've done the (a) part, don't you see opportunities for adding threads to perform some of the processing in parallel?

  6. #6
    Junior Member
    Join Date
    Jun 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    because I don't really know parallel programming that well and I have to submit my assignment

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,360
    Thanks
    49
    Thanked 2,206 Times in 2,179 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    I don't really know parallel programming that well
    Perhaps instead of doing this more complicated program, you should start with a simpler program that starts a couple of threads, lets then run for a while and then has each of them exit back to the main thread.
    If you don't understand my answer, don't ignore it, ask a question.

  8. #8
    Junior Member
    Join Date
    Jun 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    yeah I would but I need to complete this for my assignment
    Can u help me get started?

  9. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,360
    Thanks
    49
    Thanked 2,206 Times in 2,179 Posts

    Default Re: PARALLEL PROGRAMMING HELP PLEAAASE! :(

    Start by writing a simple prototype that starts two threads and waits for them to finish.
    Have the threads call a method that does some work and returns a value.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Two Parallel Arrays
    By jsmnr77 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: January 31st, 2013, 08:41 AM
  2. Parallel vectors synchronize
    By speaker in forum What's Wrong With My Code?
    Replies: 8
    Last Post: May 18th, 2012, 03:27 PM
  3. Hello! parallel vectors nightmare
    By speaker in forum Collections and Generics
    Replies: 2
    Last Post: May 18th, 2012, 02:12 PM
  4. Help with parallel array
    By kid20304 in forum Collections and Generics
    Replies: 3
    Last Post: December 6th, 2011, 04:41 PM
  5. parallel array newbie
    By NewAtJava in forum What's Wrong With My Code?
    Replies: 5
    Last Post: November 1st, 2011, 09:21 PM