Unit 8 Flashcards

1
Q

According to Unit 8, what is a process? Include at least four characteristics

A

A running instance of a launched executable program. Consists of an address space of allocated memory, security properties including ownership credentials and privileges, one or more execution threads of program code, the process state.

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

Explain what happens when a new process starts on a Linux server, excluding PID 1

A

An existing process duplicates its own address space (fork) to create a new process structure, and every new process is assigned a process id (PID). The PID and parent’s process ID (PPID) are elements of the new process environment.`

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

Explain the FIVE states that a process can go through (two different kinds of Sleep).

A

S Interruptible- Process waits for some condition. D Uninterruptible- Process also sleeping unlike s, does not respond to signals. K Killable- Identical to D state, but modified to allow a waiting task to respond to the signal that it should be killed. I Report idle- subset of D. Kernel does not count these processed when calculating load average. T stopped, the process has been stopped, by a user or another process T Traced- A process that is being debugged is also temporarily stopped Z Zombie- Child process signals its parent as it exits X Dead- when the parent cleans up (reaps) the remaining child process.

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

What does the command ps aux do on a RHEL server?

A

Shows commands and the user who ran them, computer memory, percentage, PID, VSZ (virtual memory), RSS(RAM, TTY(Terminal that runs the process), Start time and how long the process has been running

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

Most modern operating systems have some sort of job control system. Explain what this is on a Linux server

A

Allows a single shel instance to run and manage multiple commands. The job associated with each pipeline entered at the shell prompt. All processes on the pipeline are part of the job members process group. Only one job can read input and keyboard-generated signals from a terminal window at a time,

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

What is the difference between a background process and a foreground process? Why is this important to a
Sys Admin?

A

Processes apart of a job are foreground processes of that controlling terminal background process of that terminal is a member of any other job associated with that terminal.

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

What command should to I enter run copy hugefile to bigfile in the background?

A

cp hugefile bigfile &

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

What command do I run to see a list of the currently running background processes

A

Jobs command

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

Explain the difference between the commands kill -15 PID and kill-9 PID.

A

15 terminates and lets the process shut down, 9 kills which abruptly terminates the program without asking.

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

What do the commands killall and pkill do

A

Killall can signal multiple processes, based on their command name, pkill send a signal to one or more processes that match criteria. Pkill -U Joe, wil kill all processes made by Joe

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

What is the difference between tty and pts/0 in the output of the ps command?

A

Tty is the system console, alternate console, or other directly connected terminal device. Graphical environment window (pseudo-terminal)

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

What do the commands pgrep and pstree do?

A

Pgrep lists processes. Psstree views a process tree for the system or single user.

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

Explain what load average is

A

Measurement provided by the Linux kernel that is a simple way to represent the perceived system load over time.

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

What two commands can you use to see the current load average of a Linux server?

A

Uptime gives you the load average, current time, how long the machine has been up, how many user sessions are running, and the current load average. Lscpu determines how many CPUs a system has.

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