Linux - Processes
Please answer the quiz and click the "Test" button at the bottom right.
Question 1
Which of the following is a true statement?
- Only the root user may run processes from a shell.
- The shell is a process that is commonly used to execute other processes.
- The shell is the kernel component that interacts directly with hardware.
- Only one instance of a shell may be running as a process.
Question 2
Which of the following is not true for the Linux operating system?
- Multiple processes appear to be running at the same time.
- Only one instance of any given program may be running as a process.
- Programs are stored as files in the filesystem.
- Only one instance of the kernel may be running at any given time.
Question 3
Open a new terminal session and type the command python
. Then send a SIGINT signal using your keyboard. What best describes how the python process responds to the SIGINT signal? (you can exit this process by typing exit()
in the python console)
- The program ignores the SIGINT signal.
- The program has implemented a custom signal handler for the SIGINT signal.
- The program behaves as the kernel's default signal handler for the SIGINT signal, which is to terminate the process.
- The program behaves as the kernel's default signal handler for the SIGINT signal, which is to stop (suspend) the process.
- None of the above
Question 4
Given a terminal session with a long process running in it, how will you ask this process to terminate?
- CTRL+z
- CTRL+c
- CTRL+l
- CTRL+c twice
Question 5
Given a terminal session with a long process running in it, how will you ask this process to stop?
- CTRL+z
- CTRL+c
- CTRL+l
- CTRL+c twice
Given the following output:
[maxwell@station maxwell]$ ps -U maxwell
PID TTY TIME CMD
4785 ? 00:00:00 gnome-session
4828 ? 00:00:00 ssh-agent
...
4846 ? 00:00:00 xscreensaver
5410 pts/8 00:00:00 bash
5451 ? 00:00:00 same-gnome
5452 ? 00:00:00 same-gnome
5454 ? 00:00:01 gimp
5455 ? 00:00:00 script-fu
5463 pts/8 00:00:00 ps
5907 pts/7 00:00:00 bash
5942 pts/7 00:00:00 find
Answer the next 3 questions below.
Question 6
Which of the following commands would deliver a SIGTERM to the xscreensaver
process?
-
kill TERM xscreensaver
-
kill 4846
-
kill xscreensaver
-
kill -9 4846
- None of the above
Question 7
Which of the following would deliver a SIGKILL to the xscreensaver
command?
-
kill -9 4846
-
kill xscreensaver
-
kill -KILL xscreensaver
-
kill -15 4846
- None of the above
Question 8
Which of the following would send a SIGCHLD (signal number 17) to the ssh-agent
process?
-
kill -CHLD ssh-agent
-
kill -17 ssh-agent
-
kill -CHLD 4828
- All of the above
- A and C only
Question 9
Which key pressed within the top
command allows the user to send a signal to a process?
-
s
-
z
-
t
-
k
- None of the above
Question 10
The kill
command always terminates a process.
- True
- False