Chapter 9 Review & Lab Questions
Which command displays all processes?
ps -e
The at command is used to _______________.
schedule processes to run at a single instance in the future
Nice values are used to affect process priorities using a range between _____________. 0 and 20 0 and -19
-20 and 19
Where are individual user tasks scheduled to run with the cron daemon stored on a Fedora system?
/var/spool/cron/(the user's login name)
What kill level signal cannot be trapped?
9
To kill a process running in the background, you must place a % character before its process ID. True or False?
False
To see PIDs of processes when using the pstree command, type pstree -ID. True or False?
False
Which of the following statements is true? (Choose all that apply.)
If /etc/at.allow exists, only users listed in it can use the at command. If /etc/cron.allow exists, only users listed in it can use the cron command. If /etc/cron.deny exists and /etc/cron.allow does not exist, any user not listed in /etc/cron.deny can use the cron command.
A running process that top shows with the PR value 0 runs faster than a process with the PR value 10. True or False?
True
As daemon processes are not associated with terminals, you must use the -e switch with the ps command to view them. True or False?
True
How can you bypass the wait function and send a user process to the background?
You can use the Ctrl+z key combination and the bg command.
Which of these options should you use with a user-defined format to display the command that started the process?
cmd
What command is used to view and modify user jobs scheduled to run with cron?
crontab
What is the name given to a process not associated with a terminal?
daemon process
The term used to describe a process spawning or initiating another process is referred to as_____.
forking
Which option causes top to display only active processes?
i
Which process will always have a PID of 1 and a PPID of 0?
init
A runaway process that is faulty and consuming mass amounts of system resources ________.
is a rogue process
Which command can be used to see processes running in the background?
jobs
Every process has a process ID and a_______.
parent process ID
Which command entered without arguments is used to display a list of processes running in the current shell?
ps
Which command can change the scheduling priority of a running process?
renice
Which of the following commands will most likely increase the chance of a process receiving more time slices?
renice -12
If you want to run commands as root, which command do you run first?
su
Which process is the parent or ancestor of all other processes?
system
Which command is used to gain real-time information about processes running on the system with the most processor-intensive processes listed at the beginning of the list?
top
If you want to start an infinite loop in the BASH shell, which command do you use?
while:
To see all system processes, you must be logged in as root. True or False?
False
The killall command terminates _________.
all instances of a process with the same name
Which of the following scheduling priority values (nice values) causes a process to run the fastest?
-19
Which command do you use to run a script named myscript in your current directory?
./myscript
Which command shows parent-child process relationships by indenting child processes?
ps -eH
Which command displays a user-defined format?
ps -o pid,cmd
Which command displays the status of a process?
ps ax
Which command is equivalent to ps -e in terms of what processes are displayed?
ps ax
If you want to see information about a process named myproc that was started in another terminal window, which command do you use?
ps ax | grep myproc
Which column in ps output identifies parent processes?
PPID
After you create a script, what must you do before you can run it?
Set the executable permission.
When you run the ps command, how are daemon processes recognized?
There is a question mark in the TTY column.
When you run a process in the background using the & symbol at the end of the command, it displays the process ID. True or False?
True