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.
...
#i attached this question with the code,any wrong with it ?
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a C program that accepts 3 parameters. Each parameter indicates the quantity of product to be
produced.... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a C program that accepts 3 parameters. Each parameter indicates the quantity of product to be
produced.... (0 Replies)
Hi
I was reading some weblog on the internet and someone made an interesting statement.
<quote>
Linux is kernel and solaris is operating system
</quote>
Honestly I don't understand the difference between term kernel and operating system in above quote.
Could you explain me more ?
thx... (4 Replies)
we designed a primitive operating system for learning basics fundamentals and we created process switching, interrupt/polled IO for device drivers like UART and printers. We accomplish this by using our own tools called SPEDE (for downloading compiled elf image from host ubuntu system that have... (0 Replies)
Hello All,
I want to install Linux on my machine, so please tell me one thing which is the best to install-
1.)Red Hat
2.)Cent OS
3.)Red Hat
4.)Ubuntu
5.)Fedora
except that if there is any please tell me. (1 Reply)
hi guys,
i got job recently in a company which provide a product for data backup and data recovery... as dis product is wrriten in c++ am workin in c++.. now am under training and i want to learn abt Operating System concepts and OS programming using c and c++. i know basic c and c++ programming... (3 Replies)
Hi Guys,
I have a PC (laptop), where ram is 1 GB, hard disk is 400 GB, Now in my PC has window7 & oracle 10g, suppose if we now installed linux then will my system work or we should remove window7 now, please let me know that which linux version is take less space in PC. (3 Replies)
Dear Gurus/Experts of UNIX/LINUX,
Im Isravel from India, I've customized CentOS Installation ISO as per my new product requirements. I want to give serial key authentication to the clients who all are trying to install ISO file.
Can anyone guide me how to create serial key authentication... (1 Reply)
Discussion started by: isravelraja
1 Replies
LEARN ABOUT DEBIAN
setup.types
setup.types(5) Easy Software Products setup.types(5)NAME
setup.types - epm gui setup types file format.
DESCRIPTION
The EPM setup program normally presents the user with a list of software products to install, which is called a "custom" software installa-
tion.
If a file called setup.types is present in the package directory, the user will instead be presented with a list of installation types.
Each type has an associated product list which determines the products that are installed by default. If a type has no products associated
with it, then it is treated as a custom installation and the user is presented with a list of packages to choose from.
FILE FORMAT
The setup.types file is an ASCII text file consisting of type and product lines. Comments can be inserted by starting a line with the pound
sign (#). Each installation type is defined by a line starting with the word TYPE. Products are defined by a line starting with the word
INSTALL:
TYPE Typical End-User Configuration
INSTALL foo
INSTALL foo-help
TYPE Typical Developer Configuration
INSTALL foo
INSTALL foo-help
INSTALL foo-devel
INSTALL foo-examples
TYPE Custom Configuration
In the example above, three installation types are defined. Since the last type includes no products, the user will be presented with the
full list of products to choose from.
SEE ALSO epm(1) - create software packages
setup(1) - graphical setup program for the esp package manager
COPYRIGHT
Copyright 1999-2007 by Easy Software Products, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
3 April 2006 ESP Package Manager setup.types(5)