Chapter 8 Processes Flashcards

(19 cards)

1
Q

What command starts an application?

A

$ nice “name of application”

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

What is a process in the context of operating systems?

A

A running program

Each process is unique even if the same program is launched multiple times.

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

What does PID stand for in process management?

A

Process ID

Each process has a unique PID and a PPID (Parent Process ID).

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

What is the first process that starts upon bootup?

A

systemd

It has a PID of 1.

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

What happens to a child process when it completes its task?

A

It wakes up the parent process

Data is transferred to the parent, and the memory space of the child becomes a zombie.

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

What are the four types of process states?

A
  • Running
  • Sleeping
  • Stopped
  • Zombie

Each state indicates the current status of a process.

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

What command is used to see the top consuming processes?

A

top

This command provides a dynamic view of system processes.

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

What command is used to see a list of processes?

A

ps

Options vary between POSIX and BSD styles.

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

What command shows the hierarchy of processes?

A

pstree

This command visualizes the relationship between PIDs and PPIDs. Can use pstree -p to show the PIDs for each process.

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

To run a command in the background, you should add _______ to the end of the command line.

A

&

This allows the command to run without occupying the terminal.

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

What command is used to move a process to the foreground?

A

fg

You can specify the job number with %<job>.</job>

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

What signal number is the default for stopping a process?

A

15

This signal tells the process to quit normally but can be ignored.

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

What command is used to kill a process?

A

kill

You must find the PID of the process before using this command.

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

What does the signal number 9 do when killing a process?

A

Tells the process to quit immediately, cannot be ignored

This is a forceful termination of the process.

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

What command can you use to kill multiple processes by command name?

A

pkill

This command can also kill processes by UID or GID.

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

To log a user out, you need to find their PID and use which command?

A

pkill -P <PID></PID>

This effectively kills the user’s session.

17
Q

What command displays al processes running for all users

18
Q

What command is used to see options that can be used with the ps command?

19
Q

What command is used to list the different ways to kill a process?