Unit 8 Flashcards
According to Unit 8, what is a process? Include at least four characteristics
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.
Explain what happens when a new process starts on a Linux server, excluding PID 1
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.`
Explain the FIVE states that a process can go through (two different kinds of Sleep).
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.
What does the command ps aux do on a RHEL server?
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
Most modern operating systems have some sort of job control system. Explain what this is on a Linux server
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,
What is the difference between a background process and a foreground process? Why is this important to a
Sys Admin?
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.
What command should to I enter run copy hugefile to bigfile in the background?
cp hugefile bigfile &
What command do I run to see a list of the currently running background processes
Jobs command
Explain the difference between the commands kill -15 PID and kill-9 PID.
15 terminates and lets the process shut down, 9 kills which abruptly terminates the program without asking.
What do the commands killall and pkill do
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
What is the difference between tty and pts/0 in the output of the ps command?
Tty is the system console, alternate console, or other directly connected terminal device. Graphical environment window (pseudo-terminal)
What do the commands pgrep and pstree do?
Pgrep lists processes. Psstree views a process tree for the system or single user.
Explain what load average is
Measurement provided by the Linux kernel that is a simple way to represent the perceived system load over time.
What two commands can you use to see the current load average of a Linux server?
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.