Thread: Help for C program using processes and signals

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    2

    Question Help for C program using processes and signals

    Hello!

    First of all I want to appologise that my english is not very good but I hope you`ll understand me.

    I have source code of C program and the only thing i have to do is change 1 condition to another, but im not very familiar with C programming thats why Im looking for help.

    So, the assigment for this program is :
    Process(co-ordinator) which creates 10 working processes. These processes are waiting to be awaken by the co-ordinator, they do some job and wait again. Co-ordinator passes marker (integer) to the first process and awakes it. Co-ordinator adds 1 to the marker and passes it to the next process. Coordinator awakes next process, which executes the same actions and etc. After the marker passes through all processes, coordinator prints its content. FOr signaling the processes use signals and for passing the marker use messages.

    I have the ready program but using semaphores insted of signals.

    kursova.c -> Source code of the program
    kursova.c - 4shared.com - online file sharing and storage - download

    sem.c -> Source code for semaphore
    sem.c - 4shared.com - online file sharing and storage - download

    My task is to use signals instead of semaphores. I`ll be very grateful is someone can help me!

    Thanks in advance !!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Try Pastebin.com - #1 paste tool since 2002! if you've got lots of code.
    Few here can be bothered waiting for some d/l site to count down in order to help you.

    Better still, post it inline (with code tags).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with piping and signals
    By busdude in forum C Programming
    Replies: 7
    Last Post: 03-05-2010, 05:40 PM
  2. Using signals between unrelated processes (C/Linux)
    By sauronnikko in forum C Programming
    Replies: 3
    Last Post: 06-29-2009, 04:20 AM
  3. catching signals and process IDs
    By imtiaz3 in forum C Programming
    Replies: 1
    Last Post: 09-27-2008, 08:10 PM
  4. Problem with signals
    By kahad in forum C Programming
    Replies: 9
    Last Post: 12-07-2006, 10:42 AM
  5. Signal Handling program
    By langdoy in forum C Programming
    Replies: 4
    Last Post: 03-26-2002, 12:09 AM