How to compile your program

Assignment Help C/C++ Programming
Reference no: EM13321810

Problem 1 (C++ program that should run on Unix server)

Only two websites allow are and should be referenced in code. 

https://computing.llnl.gov/tutorials/pthreads/

https://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html

At a particular college, there are two admissions counselors, and five parking spots near the admissions office for visitors. There are 100 prospective students driving around trying to park and perform their admissions interview. When a prospective student sees a parking spot, he/she (generic he from now on as your book uses) pull into the spot, wait to be advised and then leave(freeing a parking lot space for one of the ones driving around). The advisors will advise a prospective student and then select one of the remaining students in the parking lot to advise next. If there are no prospective students in the parking lot, the tired advisor snoozes at his desk.

You will need your program to start 100 "prospective student" threads and two councilor threads. Each thread should print a message when it is created. Students should print when they get parking spaces and when they are advised.

When compiling, compile using the -lpthread flag. So for example, if you wrote the program as a c++ program in a file called problem1.cpp you might use

g++ -g -lpthread problem1.cpp -o problem1

Submitting:

In addition to the solutions to your programs above, you need to write a readme.txt it should contain

Well commented program. 

how to compile your program (including the actual compile command) and how to run it (including command line arguments, if any)

A description of your solution to these two problems, including what you did to solve the problem, and why you did it that way

A description of what problems still exist, what doesn't quite work right and so on.

Reference no: EM13321810

Questions Cloud

What advantages might a socialist system : What advantages might a socialist system have responding to the needs of people struck by an emergency situation like the earthquake that occurred in Haiti in January of 2010
What changes in society helped starbucks become successful : What advantages does McDonald's have in competing with Starbucks for coffee sales? What changes in society helped Starbucks become successful? What strategic factors account for Starbuck's long-term success in building brand equity? What recommendati..
Staff development programs to their curriculum : What measures can schools take to align their staff development programs to their curriculum? Provide a rationale for the measures suggested.
Community hospital uses a job-order costing system : Southwest Community Hospital uses a job-order costing system to track charges for each patient. The following charges relate to Candice O'Dea, who had laparoscopic knee surgery:
How to compile your program : how to compile your program (including the actual compile command) and how to run it (including command line arguments, if any) A description of your solution to these two problems, including what you did to solve the problem, and why you did it that..
Solve the currently very un-pc cigarette smokers problem : Write solution to solve the currently very un-PC"cigarette smokers problem" in java using Java threads, and monitors (using the "synchronized" keyword) (If it bothers your PC sensibilities, think of it at the Pot-smokers problem and then it is all pr..
Personal pollution-water pollution-air-noise-heat pollution : Remember that after you stand up from bed in the morning almost every activity of your day is going to produce some kind of pollution. Personal pollution could include: water pollution, air pollution, noise pollution, heat pollution, solid waste poll..
Null and entity subtypes : Describe the relationship between columns that can be null and entity subtypes. Under what circumstances would these columns lead to more than one entity subtype?
Delegation is a key role for all health professionals : Delegation is a key role for all health professionals. What are three factors to consider when delegating to unlicensed personnel in the health care setting?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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