View Poll Results: how are you

Voters
7. You may not vote on this poll
  • good

    1 14.29%
  • very good

    6 85.71%

Thread: Help!

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    6

    Question Help!

    Hi! everyone! I'm writing two small C programming right now. I'm not a computer programmer and computer science student. I'm doing my engineering degree right now. I really dont have any clue on those two COMPUTER programming language. Please give me a hand to deal with it! I really appreciate your help!!!

    The program 'user_interface' should:
    - connect to a message queue
    - In a loop:
    - Read two numbers from the user
    - Send a request message to the queue containing the two numbers
    - Check to see if there's a response message on the queue.
    - If there is a response:
    - print out the result contained in the response message
    - If no response messages:
    - do nothing, continue to the next run of the loop


    The program 'data_processor' should:
    - connect to the same message queue as 'user_interface'
    - In a loop:
    - Receive a request message from the queue, waiting for a
    request if necessary
    - Add the two numbers from the request message together
    - Construct a response message containing the result of the
    addition
    - send the response message to the queue

    Bear
    E-mail: [email protected]
    Icq: 62982996

  2. #2
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Can you explain what a 'message queue' is? I think I can help you out.

    --Garfield
    1978 Silver Anniversary Corvette

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    6

    Message Quene

    messages are received from the sender, stroed the the infomation in memory lock and send messages to the receiver.
    that's what message quene does.


    here is my in class notes....

    Important to know:
    A - Queue that’s accessible to more than one process.
    Send and Rear are both blocking or non-blocking

    Blocking vs Non-blocking:
    1. Error message – Non-blocking (don’t wait).
    - when queue doesn’t have any room for sends
    - called IPC_NOWAIT

    2. wait for a message to be on the queue. – Blocking (Wait).
    - wait for an open spot on the queue
    - called O


    send( ) {
    if(no space on queue) {
    if (non-blocking) return FULL;
    else wait (queue has space)
    }
    copy msg from process to queue memory
    return DONE


    recv ( ) {
    if (queue is empty {
    if (non-blocking) return EMPTY
    if (blocking) wait (something on queue)
    }
    copy msg from queue memory to process
    return DONE
    }


    i dont know why engineering students need to do C programming.
    *SIGH*

    Bear

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    6

    Really help!!

    Please help me out

  5. #5
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    Okay, so you want the user to do what? Enter in two numbers? I'm sure I can help you out, I'm just not understanding this explanation of your project. If you explain this a little better, I can give you a hand. Sorry for the problems. Just tell me exactly what you want the program to do.

    --Garfield
    1978 Silver Anniversary Corvette

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    6

    Unhappy help

    Hi Garfield,

    Actually, I dont really understand what the questiong is asking.
    I'm not a computer programmer or computer something. I really dont know anything about computer languages. I really fed-up with doing this ****!!! I will talk to my prof. tomorrow about this thing.

    Bear
    E-mail: [email protected]
    Icq: 62982996

  7. #7
    Registered User
    Join Date
    Oct 2001
    Posts
    34
    That seems like a hard question for someone that has not done anything previously in programming.

    Bear don't get discouraged it will all come.

  8. #8
    Registered User
    Join Date
    Oct 2001
    Posts
    6

    i dropped off this course

    Hi everything I would like to apologize for anyone of you that i bother you guys time on this message board. I have already dropped this course.

    Bear

Popular pages Recent additions subscribe to a feed