Results 1 to 2 of 2

Thread: operating system LINUX help

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    operating system LINUX help

    Write a C program that accepts 3 parameters. Each parameter indicates the quantity of product to be
    produced. Each product will be produced in different production line. Ready products will be placed
    in a buffer area located at the end of each production line. Packaging workers will pack the products
    into boxes. Information of each production line as follow:
    Production line A: product ready in 1-2 minutes, buffer capacity: 12 units
    Production line B: product ready in 2-3 minutes, buffer capacity: 6 units
    Production line C: product ready in 1-2 minutes, buffer capacity: 24 units
    There are currently 2 packaging workers available. Each worker needs 2 minutes to pack 6 units of
    product into a box. The production line will be temporary suspended if the buffer area is full of
    product. The operation will continue when the worker has taken 1 unit of product from the buffer
    area.
    Simulate the operation of production line and the packaging workers by using threads and
    appropriate semaphores. There are at least 5 threads, but you may use additional thread if it is
    necessary. You have to decide how the workers select the product to pack. Assume that 1 second in
    your program is equivalent to 1 minute.
    Sample output:
    ...
    Buffer A: 11
    Buffer C: 4
    Worker X packing B: 3
    Buffer B: 8
    Worker Y packing C: 2
    Buffer A: 12
    Production line A suspended.
    ...

    #here i attached the code ,can anybody help on pls
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2009
    Posts
    518

    Re: operating system LINUX help

    Hello,
    What exactly are you trying, if you have doing some coding part then please post the program. The attached file that you have posted contains full code, rather post the part of the code where you get the error. Also, what is the error you are getting? Which is the editor or compiler you are using for C programming.

Similar Threads

  1. which is the best linux operating system
    By Loyalpalm in forum Operating Systems
    Replies: 7
    Last Post: 18-11-2010, 07:46 AM
  2. Mac Like Linux Operating System
    By Mac_buntu in forum Operating Systems
    Replies: 4
    Last Post: 14-10-2009, 03:02 PM
  3. linux operating system
    By skpanda in forum Operating Systems
    Replies: 2
    Last Post: 10-08-2009, 01:00 PM
  4. gOS - Linux Operating System
    By jesse in forum Operating Systems
    Replies: 3
    Last Post: 08-04-2009, 02:48 PM
  5. Linux Operating System
    By aniecruz in forum Operating Systems
    Replies: 4
    Last Post: 11-08-2008, 12:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,847,804.81914 seconds with 17 queries