Sale!

Exercise 6 測驗說明

Original price was: $40.00.Current price is: $30.00.

Category:

Description

Rate this product

Exercise 6

測驗說明

上傳
We will use strace to track system calls.
1. Download my hello_fork.c code in the Examples folder on Canvas
2. Copy the file onto your Pi using this scp command (changing pi if you changed
the username):
scp INSERT_LOCATION_OF_FILE_ON_YOUR_COMPUTER
pi@raspberrypi.local:~/ (mailto:pi@raspberrypi.local:~/)
Enter your password for the pi when prompted
3. ssh into the pi
4. Use ls to confirm that hello_fork.c is there
5. Compile hello_fork
6. Use the command strace with the name of the executable produced by
compilation
strace ./INSERT_EXECUTABLE_NAME
The program will run until fork is called, where the parent process produces
a child process. The child process is waiting for you to enter text
You can type random text, hit enter, and the program and strace will close
7. The output produced shows the system calls that the program used. You want
to look for the line that has the system call used when the fork function is
activated. Remember what we mentioned in lecture about the system call
behind the fork function 🙂 Find the line of the related system call and submit a
screenshot with the line in view.
選擇檔案
提交測驗

Reviews

There are no reviews yet.

Be the first to review “Exercise 6 測驗說明”

Your email address will not be published. Required fields are marked *