Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Due 2 / 1 3 by 1 1 : 5 9 PM . Assigned 2 / 6 . Late, emailed, missing, or invalid files submitted
Due by : PM Assigned
Late, emailed, missing, or invalid files submitted are graded as zero; there is No Extension and No Regrading; please start on the assigned date and follow the instructions carefully.
NOTE: After you submit your work, Download and check it to ensure your submission was successful.
Difficulty: Medium
In this assignment, you will work with System Calls and contrast their usage and efficiency in your system.
Review attached ossystemcalls.pdf then complete Exercise : strace
The submission details are listed in the Exercise.
Notes & Clarifications:
Complete Exercise : strace parts NOT part
For the submission, it is better to submit all of the files as one ZIP file.
Create a folder for this assignment, and then place all of your files in that folder, then ZIP the folder and submit it on Blackboard.
Make sure to place all of the required screenshots in the folder you are Zipping for submission.
The screenshots must include compiling highlevel language sources, running programs showing their outputs, and running strace with all of their outputs redirected into a file.
Make sure to create output file use out as extension for each strace you run.
You can capture the output of the strace using the unix redirection
The strace command requires to be used with the executable, and NOT the source code.
In case of Java, the execuatable is the class file that you can use with Java executable.
In case of Python and Bash, you need to run their text file with python and bash executable, respectively.
Examples:
Make sure to include the two strace outputs for each language in your Zip file there should be strace output files with out extension
gcc helloc.c o helloc
strace e traceexecve,open,openat,close,read,write,mmap helloc helloc.out
strace c helloc hellocout
g hellocpp.cpp o hellocpp
strace e traceexecve,open,openat,close,read,write,mmap hellocpp hellocpp.out
strace c hellocpp hellocppout
To do strace for languages that require interpreters, such as Java, Python, Bash, you can use the interpreter command followed by your program:
strace e traceexecve,open,openat,close,read,write,mmap java Hellojava Hellojava.out
strace c java Hellojava Hellojavaout
strace e traceexecve,open,openat,close,read,write,mmap pythonhellopypy hellopy.out
strace c pythonhellopypy hellopyout
strace e traceexecve,open,openat,close,read,write,mmap bash hellobash hellobash.out
strace c bash hellobash hellobashout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started