CHAPTER 11. Managing Processes Flashcards

1
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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 &

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A.

The ps ef command shows all processes, including the exact command that was used to start them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Of the following nice values, which will increase the priority of the selected process?

a. 100
b. 20
c. -19
d. -100

A

C.

To increase process priority, you need a negative nice value. -20 is the lowest value that can be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following commands cannot be used to send signals to processes?

a. kill
b. mkill
c. pkill
d. killall

A

B.

mkill is not a current command to send signals to processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A.

To change the process priority from top, use r for renice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

B.

To set the tuned performance profile, use tuned-adm profile, followed by the name of the profile you want to set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a unit?

A

A unit is a thing that is started by systemd. There are different types of units, such as services, mounts, sockets, and many more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which command should you use to show all service units that are currently loaded?

A

Use systemctl list-units to show all service units that are currently loaded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you create a want for a service?

A

You create a want for a service by using the systemctl enable command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you change the default editor for systemctl?

A

Set the SYSTEMD_EDITOR variable in /etc/profile to change the default editor for systemctl.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which directory contains custom Systemd unit files?

A

/etc/systemd/system/ contains custom systemd unit files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What should you include to ensure that a unit file will automatically load another unit file?

A

Include “Requires” to ensure that a unit file will automatically load another unit file.

17
Q

Which command will show available configuration options for the httpd.service unit?

A

“systemctl show httpd” shows available configuration options for the httpd.service unit.

18
Q

Which command shows all dependencies for a specific unit?

A

“systemctl list-dependencies –reverse” shows all dependencies for a specific unit.

19
Q

What does it mean if “systemctl status” shows that a unit is dead?

A

systemctl status output indicating that a unit is dead is nothing serious; it simply means the service is currently not running.

20
Q

How do you create a Systemd override file?

A

Using “systemctl edit” on the unit that you want to modify creates a systemd override file.