LAB 8 Week 9 Oct 28th. 47 pts Name __________________________________ Due at the end of lab Nov 4th. Chapter 9 1) What is your login shell PID # ? ______________ 1 pt 2) What is your login shell PPID # ? ______________ 1 pt 3) The term "PPID" is short for _________________________________. 1 pt 4) (From Lecture) The Init process is called the parent of all processes. Why? 1 pt ______________________________________________________________________ ______________________________________________________________________ 5) What are the 3 parts/segments of a running process ? 3 pts _____________________ _____________________ _____________________ 6) What does fork do ? ( Don't use the term spawn in your answer ) 5 pts ______________________________________________________________________ ______________________________________________________________________ 7) What does exec do ? 5 pts ______________________________________________________________________ ______________________________________________________________________ 8) Type the command "sleep 30 & sleep 30 & sleep 30 & sleep 30 &" A) What are the PIDs of the processes? ___________________ 2 pts __________________ ___________________ _______________________ B) What are the PPIDs of the processes ? ___________________ 2 pts __________________ ___________________ _______________________ 9) Type the command "(sleep 10;banner hello)&". Wait 10 seconds and now type the same command with a sleep of 30 seconds instead of 10. Use the kill command to terminate the sleep. What happened to the banner command? 2 pts ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ 10) Type "exec /bin/sh" and then "sleep 3600 &". Now log out. Log back into the system and check the status of the process with ps -u . What is it's status? 4 pts ______________________________________________________________________ ______________________________________________________________________ 11) Repeat step 10 above but use the nohup command. For example "nohup sleep 3600 &". What happens to the process when you logout? 4 pts ______________________________________________________________________ ______________________________________________________________________ 12) Use kill -3 to terminate the command sleep 360 &. What happened? __________________________________________________________________ 1 pt 13) Use the at command to have banner display hello 2 minutes from now. What syntax did you use? ___________________________________________________________________ 10 pts 14) What option to ps displays processes belonging to a user? _________ 1 pt 15) What option(s) to ps display the arguments passed to a command? 1 pt ______________________________________________________________________ 16) What does the tee command do? 2 pts ______________________________________________________________________ ______________________________________________________________________ 17) Give an example of the tee command. 1 pt ______________________________________________________________________