Find Jobs
Hire Freelancers

C++ and Perl homework help

$30-60 USD

Completed
Posted over 22 years ago

$30-60 USD

Paid on delivery
I need someone to write some simple C++ and Perl programs as the deliverables describes. These programs will need to compile and run in an Unix environment. ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. !!LOOK BELOW!! Write a program (in C/C++ or perl) to simulate the busy-wait process of an I/O device (as demonstrated in class). - The program checks to see if there is a file called "busy". If there is one, it prints a message "device is busy" and then wait. - If there is no "busy" file (either at the start of the program or after waiting for a while), the program prints a message "starting I/O operation", creates a file called "busy" (so that no other program can start another I/O operation). - The program then waits until a file "done" appears. It then prints a message "I/O operation is completed", and deletes both the "busy" and "done" file. Write 3 C/C++ programs to print 5000 lines of the form This is output line number 1. This is output line number 2. .... (1) to stdout, (2) to a file called "output", (3) to /dev/null. In each case, use "gettimeofday" to find the time needed for each of the three programs to complete the output. Can you explain the outcome? Write a perl program "type" that does the following: (1) type FILE - prints the entire content of FILE to stdout. (2) type FILE 9 - prints the first 9 lines of FILE (3) type FILE 9 20 - prints lines 9 to 20 (inclusive) of FILE (4) type FILE 9 end - prints lines 9 to end of FILE (5) type FILE -9 - prints last 9 lines of FILE (5) is probably the hardest. Hint: There is more than one way to solve the problem. Some Unix commands may help, such as "wc" or "tail" (use "man" to find out what these commands do). ## Deadline information These programs and others that I will post will all have deadlines of Fridays by 10pm Central Standard Time.
Project ID: 2828761

About the project

2 proposals
Remote project
Active 23 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$46.75 USD in 14 days
4.5 (33 reviews)
4.2
4.2
2 freelancers are bidding on average $45 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
4.0 (1 review)
0.7
0.7

About the client

Flag of UNITED STATES
United States
5.0
4
Member since Oct 7, 2001

Client Verification

Other jobs from this client

homework help 7
$20-25 USD
Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.