CHAPTER 11. Managing Processes Flashcards
Which of the following is not generally considered a type of process? (Choose two.)
a. A shell job
b. A cron job
c. A daemon
d. A thread
B and D.
There are two different types of processes that each request a different management approach. These are shell jobs and daemons. A cron job and a thread are subdivisions of these generic categories.
Which of the following can be used to move a job to the background?
a. Press &
b. Press Ctrl-Z and then type bg
c. Press Ctrl-D and then type bg
d. Press Ctrl-Z, followed by &
B. The Ctrl-Z command temporarily freezes a current job, after which the bg command can be used to resume that job in the background.
Which key combination enables you to cancel a current interactive shell job?
a. Ctrl-C
b. Ctrl-D
c. Ctrl-Z
d. Ctrl-Break
A.
The Ctrl-C command cancels the current job. Ctrl-D sends the EOF character to the current job, which can result in a stop if this allows the job to complete properly. The difference with Ctrl-C is that the job is canceled with no regard to what it was doing. The Ctrl-Z keystroke freezes the job
Which of the following statements are true about threads? (Choose two.)
a. Threads cannot be managed individually by an administrator.
b. Multithreaded processes can make the working of processes more efficient.
c. Threads can be used only on supported platforms.
d. Using multiple processes is more efficient, in general, than using multiple threads.
A and B.
Individual threads cannot be managed by an administrator. Using threads makes working in a multi-CPU environment more efficient because one process cannot be running on multiple CPUs simultaneously, unless the process is using threads.
Which of the following commands is most appropriate if you’re looking for detailed information about the command and how it was started?
a. ps ef
b. ps aux
c. ps
d. ps fax
A.
The ps ef command shows all processes, including the exact command that was used to start them.
Of the following nice values, which will increase the priority of the selected process?
a. 100
b. 20
c. -19
d. -100
C.
To increase process priority, you need a negative nice value. -20 is the lowest value that can be used.
Which of the following shows correct syntax to change the priority for the current process with PID 1234?
a. nice -n 5 1234
b. renice 5 1234
c. renice 5 -p 1234
d. nice 5 -p 1234
C.
Use the renice command to change priority for currently running processes. To refer to the process you want to renice, use the -p option.
Which of the following commands cannot be used to send signals to processes?
a. kill
b. mkill
c. pkill
d. killall
B.
mkill is not a current command to send signals to processes.
Which of the following commands would you use from top to change the priority of a process?
a. r
b. n
c. c
d. k
A.
To change the process priority from top, use r for renice.
Which of the following commands will set the current performance profile to powersave?
a. tuneadm profile set powersave
b. tuned-adm profile powersave
c. tuneadm profile –set powersave
d. tuned-adm profile –set powersave
B.
To set the tuned performance profile, use tuned-adm profile, followed by the name of the profile you want to set.
What is a unit?
A unit is a thing that is started by systemd. There are different types of units, such as services, mounts, sockets, and many more.
Which command should you use to show all service units that are currently loaded?
Use systemctl list-units to show all service units that are currently loaded.
How do you create a want for a service?
You create a want for a service by using the systemctl enable command.
How do you change the default editor for systemctl?
Set the SYSTEMD_EDITOR variable in /etc/profile to change the default editor for systemctl.
Which directory contains custom Systemd unit files?
/etc/systemd/system/ contains custom systemd unit files.