Answered step by step
Verified Expert Solution
Link Copied!

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 2/13 by 11:59 PM. Assigned 2/6.
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 os-system-calls.pdf, then complete Exercise 1: strace
The submission details are listed in the Exercise.
Notes & Clarifications:
- Complete Exercise 1: strace parts 1,2,3.(NOT part 4)
- 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 high-level 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 2>
- 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 10 strace output files with .out extension).
gcc helloc.c -o helloc
strace -e trace=execve,open,openat,close,read,write,mmap ./helloc 2> helloc.out
strace -c ./helloc 2> helloc2.out
g++ hellocpp.cpp -o hellocpp
strace -e trace=execve,open,openat,close,read,write,mmap ./hellocpp 2> hellocpp.out
strace -c ./hellocpp 2> hellocpp2.out
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 trace=execve,open,openat,close,read,write,mmap java ./Hellojava 2> Hellojava.out
strace -c java ./Hellojava 2> Hellojava2.out
strace -e trace=execve,open,openat,close,read,write,mmap python3./hellopy.py 2> hellopy.out
strace -c python3./hellopy.py 2> hellopy2.out
strace -e trace=execve,open,openat,close,read,write,mmap bash ./hellobash 2> hellobash.out
strace -c bash ./hellobash 2> hellobash2.out

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Discuss the key people management challenges that Dorian faced.

Answered: 1 week ago

Question

How fast should bidder managers move into the target?

Answered: 1 week ago