subject
Engineering, 07.04.2020 02:30 geunagillis1

Write a program that accepts a phrase of unspecified length on the command line. For example: $ ./osproj2b Operating Systems Class at TAMUCC The main() in this program has to create two threads running functions (vow and cons). The threads should take turns printing the respective words of the phrase supplied on the command line. The vow thread should print all the words that start with a vowel and the cons thread should print all words starting with a consonant. Note that the main thread (running main()) should not print anything itself, the output should be supplied by the threads that it creates. The order of words in the phrase should not be changed in the printout. Your program should work for any phrase of any reasonable length, not just the one given in the example. The output of your program should look similar to the following

$ ./osproj2b Operating Systems Class at TAMUCC vow: Operating cons: Systems cons: Class vow: at cons: TAMUCCIn this part you are *not allowed* to use synchronization primitives such as mutexes for thread coordination. You can use sched_yield() to relinquish control of the CPU. You will have to investigate some of the other pthread functions available to you for this project. Look for examples online. The name of this program must be osproj2b. c or osproj2b. cpp.

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 18:10
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
question
Engineering, 04.07.2019 19:10
10 kg of co2 is initially contained at 400 kpa and 300 k. the gas constant for carbon dioxide is 189 j/lkg k) and has a specific heat ratio, k, of 1.289. isentropic expansion then occurs until the pressure is 200 kpa. a) determine the initial volume of co2 in m. b) determine the final temperature in k. c) determine the work done by the system during the expansion kl.
Answers: 2
You know the right answer?
Write a program that accepts a phrase of unspecified length on the command line. For example: $ ./os...
Questions
question
Chemistry, 09.10.2019 05:00
question
Mathematics, 09.10.2019 05:00
question
History, 09.10.2019 05:00
question
English, 09.10.2019 05:00
question
Mathematics, 09.10.2019 05:00
question
Mathematics, 09.10.2019 05:00
question
Mathematics, 09.10.2019 05:00
question
Mathematics, 09.10.2019 05:00
Questions on the website: 13722359