Thread: Classical Unix IPC mechanisms

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    1

    Classical Unix IPC mechanisms

    hi all
    im learning in university of khartoum and i have this Assignment can one help me to write this program


    Write a “Mad Sentence Composer” program with the following specs:
    - Create three files. Each file contains only certain kinds of words, i.e. one file will contain nouns, another
    verbs and the third one contains adverbs. Each file contains at least 10 words.
    - Create three processes and assign one process to each one file. Have the processes read words out
    of its file randomly.
    - Create three pipes. Each pipe will be assigned a process/file pair. Have the three processes put the
    words read into its corresponding pipe.
    - Create a fourth process and have it read the words out of the pipes in the right order, such that
    primitive sentences are formed, e.g. “singer sings loudly”. Have the process output these sentences,
    one sentence per line.
    - Don’t pay attention to grammatical correctness.
    - Create two variations of the program, one using classical pipes, one using FIFOs (“named pipes”).

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Read about the homework policy.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Segmentation fault - IPC
    By kbfirebreather in forum C Programming
    Replies: 7
    Last Post: 02-01-2009, 03:17 PM
  2. How to program in unix
    By Cpro in forum Linux Programming
    Replies: 21
    Last Post: 02-12-2008, 10:54 AM
  3. Setting up a Unix box
    By @nthony in forum Tech Board
    Replies: 6
    Last Post: 07-22-2007, 10:22 PM
  4. UNIX (Linux, BSD, etc) Programming :: UNIX
    By kuphryn in forum Linux Programming
    Replies: 6
    Last Post: 04-01-2004, 08:44 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM