Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve it for a Windows machine, please!! Individual assignment. Copying the work of others is prohibited for this assignment. Objective: Help students understand the principles

Solve it for a Windows machine, please!!

image text in transcribed

image text in transcribed

Individual assignment. Copying the work of others is prohibited for this assignment. Objective: Help students understand the principles of copying files from the point of view of an operating system, i.e. using system calls. Students will gain hands-on experience in copying files, system calls, working with APIs, and tracing utilities. Tasks: The Chapter 2 lecture slides describe a program that copies contents of one file to a destination file. It first prompts the user for the name of the source and destination files. Write this program in Cor Java. Make sure that the program includes all necessary error checking (e.g. that the source file exists, etc.). The sequence of system calls for this program is shown below. This sequence copies the source file to a destination. source file destination file Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Write prompt to screen Accept input Open the input file if file doesn't exist, abort Create output file if file exists, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally Once you have written and tested the program, run the program using a utility that traces system calls. Linux systems provide the strace utility whereas Solaris and Mac OS have the dtrace utility. On Windows, you will have to trace the program using a debugger or your IDE. Submission: Submit the following: 1) A short report (e.g. text or Word) containing the implementation details and sample input/output. In the report, provide implementation details, sample inputs and outputs of the program (e.g. command line input/output), and output of the system call trace. 2) The source code of your program. a. Zip all files together and submit on Blackboard a single zip file named Assignment1-{student number}. *Replace {student number} above with your actual student number. *Unlimited resubmissions are allowed, but only your last submission will be marked. *As per the course outline, late assignments will be marked off at 20% per school day late including the due date, up to 3 days. After which the submission is worth zero. * Copying the work of others will be checked. Submissions determined to be copies will be worth zero. Individual assignment. Copying the work of others is prohibited for this assignment. Objective: Help students understand the principles of copying files from the point of view of an operating system, i.e. using system calls. Students will gain hands-on experience in copying files, system calls, working with APIs, and tracing utilities. Tasks: The Chapter 2 lecture slides describe a program that copies contents of one file to a destination file. It first prompts the user for the name of the source and destination files. Write this program in Cor Java. Make sure that the program includes all necessary error checking (e.g. that the source file exists, etc.). The sequence of system calls for this program is shown below. This sequence copies the source file to a destination. source file destination file Example System Call Sequence Acquire input file name Write prompt to screen Accept input Acquire output file name Write prompt to screen Accept input Open the input file if file doesn't exist, abort Create output file if file exists, abort Loop Read from input file Write to output file Until read fails Close output file Write completion message to screen Terminate normally Once you have written and tested the program, run the program using a utility that traces system calls. Linux systems provide the strace utility whereas Solaris and Mac OS have the dtrace utility. On Windows, you will have to trace the program using a debugger or your IDE. Submission: Submit the following: 1) A short report (e.g. text or Word) containing the implementation details and sample input/output. In the report, provide implementation details, sample inputs and outputs of the program (e.g. command line input/output), and output of the system call trace. 2) The source code of your program. a. Zip all files together and submit on Blackboard a single zip file named Assignment1-{student number}. *Replace {student number} above with your actual student number. *Unlimited resubmissions are allowed, but only your last submission will be marked. *As per the course outline, late assignments will be marked off at 20% per school day late including the due date, up to 3 days. After which the submission is worth zero. * Copying the work of others will be checked. Submissions determined to be copies will be worth zero

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

Identify and explain the six qualitative characteristics of GAAP.

Answered: 1 week ago

Question

Understand how environmental scanning is practised.

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago