programming assignment need advice!!!

This is a discussion on programming assignment need advice!!! within the C Programming forums, part of the General Programming Boards category; i need to develop a multithreaded M3 program in C or C++ by using POSIX threads(pthreads) library to statistically analyze ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    1

    Question programming assignment need advice!!!

    i need to develop a multithreaded M3 program in C or C++ by using POSIX threads(pthreads) library to statistically analyze a set of data by computing its minimum value, maximum value and the mean of the population.


    You may create the data set by hard coding the running sequence numbers
    e.g. 1, 2, 3 . 8000

    The size of the data set in this assignment is 8000.

    You will write a multithreaded program to compute the M3 i.e. Minimum, Maximum and Mean by using 8 worker threads


    Each of the worker thread will update computed sum, minimum and maximum marks for the assigned partitions of 1000s. You need to handle sharing of global data carefully in order to avoid any race condition.

    Once all the worker threads have completed their assigned work, the master thread will compute the mean value of the population and report the computed M3 i.e. Minimum, Maximum and Mean.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Ok, so the policy of this board is to "not do homeework/assignments".

    At the same time, we are happy to help with individual problems of a PART of a assignment.

    But you are not asking some detailed questions about your assigmment, rather just posting what looks like the assignment specificatin (or part thereof).

    Perhaps you'd get SOME help if you post a specific question? Don't understand any of your assignment, or is there a particular point that you want to have advice on?

    --
    Mats

  3. #3
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    So, you need to ask yourself, how will the worker threads communicate to the master thread that they're done? The rest is laid out for you in the assignment's description, right?
    There are 10 types of people in this world, those who cringed when reading the beginning of this sentence and those who salivated to how superior they are for understanding something as simple as binary.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Menu
    By Krush in forum C Programming
    Replies: 17
    Last Post: 09-01-2009, 03:34 AM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 03:39 PM
  3. Help with a pretty big C++ assignment
    By wakestudent988 in forum C++ Programming
    Replies: 1
    Last Post: 10-30-2006, 09:46 PM
  4. Replies: 1
    Last Post: 10-27-2006, 02:21 PM
  5. I messed up - any advice?
    By Ninestar in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 12-17-2005, 04:25 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21