{"id":156441,"date":"2018-02-20T23:50:30","date_gmt":"2018-02-20T23:50:30","guid":{"rendered":"https:\/\/writemyessayfree.com\/c-assignment-pipe-programming-in-linux"},"modified":"2017-08-17T18:35:36","modified_gmt":"2017-08-17T18:35:36","slug":"c-assignment-pipe-programming-in-linux","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/c-assignment-pipe-programming-in-linux\/","title":{"rendered":"C++ Assignment Pipe programming in Linux"},"content":{"rendered":"<p><a class=\"c-assignment-pipe-programming-linux\/\"><\/a> <\/p>\n<p>PLEASE HELP ME WITH THE FOLLOWING ASSIGNMENT:<\/p>\n<p>I BOUGHT ANOTHER SOLUTION FROM ANOTHER TUTOR, BUT I DON\u2019T KNOW HOW TO RUN IT. IT IS AN OLD SOLUTION AND I THINK TUTOR IS NON-ACTIVE AND DOESN\u2019T REPLAY MY MESSAGES. IT IS EITHER WRONG OR I AM DOING SOMETHING WRONG IN UNIX SO I NEED A TUTORIAL ON HOW IT WORKS.<\/p>\n<p>AFTER TUTOR IS ASSIGNED, I WILL SEND LINK TO SAID BOUGHT SOLUTION Here is link to old solution bought from:<a href=\"https:\/\/studyacer.com\/question\/c-assignment-pipe-programming-in-linux-423636\" rel=\"nofollow\">https:\/\/studyacer.com\/question\/c-assignment-pipe-programming-in-linux-423636<\/a> \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>Write a calculator program to compute math equations using pipes \u2013 program needs to fork() as many times as needed and use pipes to communicate to children. Equation specified in the first line of the data file will determine this setup. Once the setup is done, parent task reads the data from the data file and pumps into various pipes in parallel and results come back to main task using another pipe. add, subtract, multiply &amp; divide are the available tools in<a href=\"http:\/\/www.speedyshare.com\/NEn7B\/proj-files.rar(click\" rel=\"nofollow\">http:\/\/www.speedyshare.com\/NEn7B\/proj-files.rar(click<\/a> slow download) \u2013 you can copy them to your working directory to use with your project. All tasks use standard input stream 0 to read the first argument, use stream 3 to read 2nd argument and use standard output stream 1 for output. Main task uses the pipe stream numbers directly since it needs standard I\/O streams to communicate with the user. Here is an example: configuration diagram for computing \u201ca \u2013 b * c\u201d looks like the following. Note that the whole equation is processed left to right. No need to worry about operator precedence since that is not our focus here.<\/p>\n<p>Sample data file content: a \u2013 b * c 30 20 2 500 10 20 90 1 10 Usage: calculator &lt; data.txt Expected output: 20 9800 890<\/p>\n<p>Parent task can close the pipes when eof is reached for input file. When eof is detected in the pipe that brings the results in, parent task can quit.<\/p>\n<p>Watch this 8 minute video \u2013 it can help you with debugging. I have made sum, subtract, divide and multiply tools to display both input and output values using standard error stream. <a href=\"http:\/\/www.youtube.com\/watch?v=4kwiLSGRoM0\" rel=\"nofollow\">http:\/\/www.youtube.com\/watch?v=4kwiLSGRoM0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PLEASE HELP ME WITH THE FOLLOWING ASSIGNMENT: I BOUGHT ANOTHER SOLUTION FROM ANOTHER TUTOR, BUT I DON\u2019T KNOW HOW TO RUN IT. IT IS AN OLD SOLUTION AND I THINK TUTOR IS NON-ACTIVE AND DOESN\u2019T REPLAY MY MESSAGES. IT IS <a href=\"https:\/\/www.benedictsol.com\/blogs\/c-assignment-pipe-programming-in-linux\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-156441","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/156441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=156441"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/156441\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=156441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=156441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=156441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}