Create a program called producer-consumer

Assignment Help Computer Engineering
Reference no: EM132109270

In this project you will create a program called producer-consumer. c that will do the following:

when the -p command line argument is passed, it will act as a producer

when the -c command line argument is passed, it will act as a consumer

the message produced by the producer will be given by the command line argument -m "string"

the depth of the queue used by your producer consumer solution will be given by the -q integer command line argument combination.

Your program will either use unix socket (-u) or shared memory (-s) depending on user input in the command line argument

Your program must use linux semaphores to protect critical sections.

When given the -e option, your program should print the string being produced or consumed followed by a new line each time the string is produced or consumed.

Reference no: EM132109270

Questions Cloud

Visualize the impact of the automation : practical laboratory exercises to automate a business process, and to visualize the impact of the automation - Assignment - Parchment Bonanza
Describe the process the algorithm is executing : View the visual presentation of your algorithm in xSortLab; Describe the process the algorithm is executing;Characterize and evaluate the algorithm in terms
Evans argued that under accord and satisfaction : Evans used his credit card to run up a $98.75 bill with the Rosen Department Store. When Rosen tried to collect, Evans wrote a check for $79.00.
Implement a program such that it simulates the process : Implement a program such that it simulates the process of repeated attempts to hit a target with a projectile.
Create a program called producer-consumer : Your program will either use unix socket (-u) or shared memory (-s) depending on user input in the command line argument .
How to calcluate the hmac value : Can you help me with the process (or psuedocode) of how to calcluate the HMAC value?
Briefly describe the actual requirements of the job : Describe the principle characteristics of these individuals or groups, particularly those characteristics that impact on their interaction with you
Explain what is a meant by the term event : Programs written for a graphical user interface have to deal with events. Explain what is a meant by the term "event".
Calculate the price at which you bought the bond : i) Calculate the price at which you bought the bond and the price at which you sell it if you sold it now

Reviews

Write a Review

Computer Engineering Questions & Answers

  Questiondodocs contains tasks 1-7perform task 1-7 from

questiondo.docs contains tasks 1-7perform task 1-7 from backup services database -create the clients by service rep

  Providenbspa hypothetical situation for each signal type

discussnbspfour different types of wireless technologies in a 350- to 700-word paper.describenbspthe characteristics

  1 your senior manager catches up with you after your

1 your senior manager catches up with you after your project status meeting to tell you that your project has been

  How are d and y different from command mode commands

How are d and y different from Command Mode commands like j and $? How do you noninteractively and globally replace Internet with Web in all lines of a file?

  Find out the error in the recursive method

Find out the error in the recursive method.

  Explain to a-company might set up auditing

define to A-Companyy how they might create a security template and some useful settings. What security suggestions do you have to secure communications from Human Resources server to the Payroll server.

  What is the rest balance at the end of one year

A student borrows 3,000 at an interest rate of 2 % per month on the unpaid balance. If the student pays $200 at the end of each month, what will be the remaining balance at the end of one year.

  Describe a current technology that you have chosen to adopt

Describe a current technology that you have chosen to adopt and You should include the specific brand and/or model if it was relevant to your decision.

  Write a function userplay

Write a function playNovice(marbles) that given the number of marbles returns a random number between 1 and half of the number of marbles.

  Demonstrate an understanding of working with arrays

The purpose of this lab is to demonstrate an understanding of working with arrays as instance variables. Your boss has asked you to create a new pizza ordering system to help customers buy pizzas.

  Especially for you jewelers is a small jewelry company in a

especially for you jewelers is a small jewelry company in a college town. over the last couple of years it has

  How does an attack differ from a security risk

Pick two of these questions, restate each selected question, then in the next line, post your viewpoint/answer to it. Make sure you state your reasons.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd