LFS201 Linux Certified System Admin Review
Scheduling
processes are controlled by ?
$ renice --help
renice is used to raise or lower the nice value of an already running process. It basically lets you change the nice value on the fly.
fork or exec
shell commands such as echo and kill are built into the shell itself and do not involve loading of program files. For these commands, no Blank or Blank is issued for the execution.
True
yum install <package> is used to install a new package. True or False?
True
yum provides <file path> cannot be used to find which package provides the file specified as argument. True or False?
True
yum search can be used for searching on package name and short description. True or False?
False
yum update does not accept a package as an argument. True or False?
ulimit
1. Provides control over the resources available to the shell and processes it creates on systems that allow such control. 2. values are in 1024 -byte increments, except for -t, which is in seconds. options: -s soft resource limit -h hard resource limit -f max size of the file written by the shell
What happens first when a user executes a bash command?
A new process is created from the user's login shell A system call puts the parent shell process to sleep. The command is loaded onto the child process's space via the exec system call. The command completes executing, and the child process dies via the exit system call.
ldd
A program which uses shared libraries has to be able to find them at runtime. ____ can be used to ascertain what shared libraries an executable requires. It shows the soname of the library and what file it actually points to.
Every process
Always has a pid aka Process ID), a ppid aka Parent Process ID), and a pgid aka Process Group ID). In addition, every process has program code, data, variables, file descriptors, and an environment.
forking
An average Linux system is always creating new processes. This is often called what!!!!
Kernel Mode
At any given time, a process or any particular thread of a multithreaded process may be executing in either user mode or system mode, which is usually called WHAT? by kernel developers.
context
Every process is executing some programs. At any given moment, the process may take a snapshot of itself by trapping the state of its CPU registers, where it is executing in the program, what is in the process's memory, and other information. This is the Blank of the process?
/proc/sys/kernel/pid_max,
For historical reasons, the largest PID has been limited to a 16-bit number, or 32768. It is possible to alter this value by changing?
cat /proc/cpuinfo
Highly technical cpu information
True
If not specified, kill will send a SIGTERM signal by default. True or False?
ps -elf
to see which processes are of this nature; when you run a command such as what?
static libraries
The code for the library functions is inserted in the program at compile time, and does not change thereafter, even if the library is updated.
Dynamic Link Library AKA Shared Library
The code for the library functions is loaded into the program at run time, and if the library is changed later, the running program runs with the new library modifications.
nice -n 5 command Arguments
The niceness value can range from -20 (the highest priority) to +19 (the lowest priority). The normal way to run nice is:
What happens second when a user executes a bash command?
The parent shell is re-awakened by the death of the child process and proceeds to issue a new shell prompt. The parent shell then waits for the next command request from the user, at which time the cycle will be repeated
defunct or zombie process
The process enters this state when it terminates and no other process has inquired about its exit state and has released all of its resources, except its exit state and its entry in the process table. If the parent of this process dies, the process is adopted by init PID = 1 or kthreadd PID = 2
Sleeping or waiting State process
The process state is waiting on a request, usually I/O, that it has made and cannot proceed further until the request is completed. When the request is completed, the kernel will wake up the process and put it back on the run queue, and it will be given a time slice on a CPU.
lscpu
This command returns technical information, such as the sizes of cache that the CPU supports.
Stopped State process
This process state has been suspended. This state is commonly experienced when a programmer wants to examine the executing program's memory, CPU registers, flags, or other attributes. Once this is done, the process may be resumed if the user hits Ctrl-Z.
Running State process
This process state is currently executing on a CPU or CPU core or sitting in the run queue, eagerly awaiting a new time slice. It will resume running when the scheduler decides it is now deserving to occupy the CPU, or when another CPU becomes idle and the scheduler migrates the process to that CPU
/etc/security/limits.conf
To make changes to U-limit that are effective for all logged-in users, you need to modify what file.
echo $PATH
Type _______ to see the directories that make up your defined path.
cat /etc/fstab
Type_____ to view this configuration file using an absolute file reference.
shared libraries
Using _____is more efficient because they can be used by many applications at once; memory usage, executable sizes, and application load time are reduced. They also have the extension .so. Typically, the full name is something like libc.so.N, where N is a major version number.
process resource isolation.
When a process is started, it is isolated in its own userspace to protect it from other processes. This promotes security and creates greater stability. This is sometimes called what?
/etc/init.d/functions
When using SysVinit, scripts in the BLANK directory start various system daemons.
daemon process
a background process whose sole purpose is to provide some specific service to users of the system:
Background Processing
a command is issued for What?...by adding an ampersand -&- at the end of the command line
init
usually, the first user process run on a system, and thus becomes the ancestor of all subsequent processes running on the system.
Application code
what code never runs in kernel mode, only the system call itself which is kernel code.
system calls
a process must use _____ to indirectly access hardware. The fundamental interface between an application and the kernel.
passwd
change the password of a user account. It is runnable by any user. When a user executes this program, the process runs with root permission in order to be able to update the write-restricted files, /etc/passwd and /etc/shadow, where the user passwords are maintained.
uname
displays basic information on the kernel and the CPU.
setuid
if a file has this, the person executing the file will take on the properties of the owner, specify an s in the argument
kthreadd
internal kernel thread
False
kill, killall and pkill all accept a process name as a parameter. True or False?
Daemons
only operate when needed. started at boot time. names often end with lowercase d. examples include httpd and systemd-udevd. may respond to external events systemd-udevd) or elapsed time aka crond have no controlling terminal and no standard input/output devices. provide better security control.
300
pid_max, at which point they will start again at PID = ?
True
Passing -9 or -SIGKILL to kill has the same effect on the target process. True or False?
nice and renice commands
Process priority can be controlled through the What?
Context Switching
Processes can be scheduled in and out when sharing CPU time with others or while waiting for some condition to be fulfilled. Being able to store the entire context when swapping out the process and being able to restore it upon execution resumption is critical to the kernel's ability
process
an executing program and associated resources, including environment, open files, signal handlers, etc. The same program may be executing more than once simultaneously, and thus, be responsible for multiple processes.