OS Test 1 Concepts
by jvadair
arrow_back_ios_new
OS
the control interface of a programmable device, including the hardware/software bridge, or these days the bridge between the software that controls the device, and the software that abstracts the device; the monitor or supervisor; some say the software that controls resources and resource contention
arrow_forward_ios
arrow_back_ios_new
arrow_forward_ios
expand_more Scroll for list view... expand_more
151 cards
| 1 | OS |
the control interface of a programmable device, including the hardware/software bridge, or these days the bridge between the software that controls the device, and the software that abstracts the device; the monitor or supervisor; some say the software that controls resources and resource contention |
| 2 | CLI |
the command line interface of an OS, usually a shell such as bash in a *nix |
| 3 | bare metal |
a system where the OS is running natively, not mediated by a (significant) emulator or virtualization |
| 4 | virtual machine |
a system where the OS is not running in bare metal |
| 5 | virtual desktop |
a kind of virtualization where the desktop functions are provided as if they were native |
| 6 | server |
a system where the intented users are mediated by the internet, esp for web serving static and dynamic data (server-side computation) to clients |
| 7 | ssh |
secure shell program used to interact with the cli of a *nix server |
| 8 | w |
the what command: show who is logged on and what they are doing (should you see this?) |
| 9 | jobs |
show jobs launched from this login, or shell, non-terminated |
| 10 | ps |
show processes, which includes options to see all, or all for a specific user (cf. man ps, ps -e, ps -u www-data) |
| 11 | vi |
the original *nix editor, see also vim (bloated), nano ok for this class, vi for power users |
| 12 | man |
a command to show the manual page of a command in *nix; does not include shell built-ins; can be hard to read, written as a reference not a how-to; ok to use google and chat these days for man page sorts of help |
| 13 | tab-completion |
in most shells, tab will suggest or default complete the command or file name (some contexts does not apply) |
| 14 | hidden file |
in most shells, ls will not list files beginning with ., but ls -a will; vi .swp files are hidden for example |
| 15 | file extensions |
such as .txt, not needed in *nix but sometimes used; optional; linux applies methods to objects, does not define objects as having methods |
| 16 | linux commands |
ls (know the options), mv, rm, mkdir, cd, cp, kill -9 %1, killall a.out, kill -9 12223, ctrl-Z, ctrl-C, fg, bg, ./a.out & (starts as a background process) |
| 17 | cc |
the c compiler aka gcc, creates a a.out binary by default, which has x permission, allowing ./a.out execution at cli |
| 18 | main |
the main function in a c program, after declarations, includes, and functions (or their prototypes) |
| 19 | live-boot |
usually usb into linux, a session where the OS image (an "ISO" 9660 cd/dvd formatted file) is read-only and occupies ram, not disk; often with no persistence layer |
| 20 | secondary storage |
usually a disk, attached ssd or hdd, or removable pen/thumb drive, but also includes network attached storage (NAS), cloud storage, tape archive, anything nonvolatile |
| 21 | nonvolatile RAM |
rare primary storage that persists after power loss or powerdown (for how long?); probably an infosec liabilty |
| 22 | CPU |
a processing unit which might have multiple cores |
| 23 | core |
a single processing device which might have hyperthreaded trickery, aka a 1-core cpu |
| 24 | cpu scaling |
hardware per-cpu clock rate dynamism that allows cooling and faster/slower processing, sw or hw controlled, see also modern big/little heterogeneous architectures (non smp, non-symmetric multiprocessing) |
| 25 | DRAM |
dynamic random access memory, 2-16GB |
| 26 | zram |
linux compressed DRAM, often 3:1 compression; takes DRAM and CPU to use zram |
| 27 | ramdisk |
part of RAM mounted like an SSD or HDD |
| 28 | registers |
few, about 8 or 16, close to cpu, fast (actual cpu registers number in the hundreds but are not general purpose integers) |
| 29 | cache |
the fast memory that dominates performance of a system these days; it had been DRAM; managed mainly by hardware, but sometimes OS can (indirectly?) prefetch, but not pin lines, like locking pages in memory |
| 30 | L0 cache |
if there is one, 128bits, like a register |
| 31 | L1 cache |
fast cache, i for instructions, d for data, 2-64kB, 64byte cache lines, so 1000 entries |
| 32 | L2 cache |
maybe shared by cores, 256-512kB |
| 33 | L3 cache |
more like fast DRAM, 1-8MB |
| 34 | device driver |
low level software (c or c++) written by hardware vendors that allow generic OS interfaces to the hardware; typically security holes, see cve/cwe (common vulnerability/weakness enumerations) |
| 35 | tps |
in iostat, transfers/sec which looks like transactions/sec (not a big deal); example of things we care about in OS |
| 36 | protection |
typically memory protection which prevents a user from looking at another user's memory, or a user from using memory in the wrong way, cf. stack smashing, segmentation fault; boomer ideas about security as os-survival, but not actual infosec; example of things we care about in OS |
| 37 | journaling |
a general idea for managing a file system where metadata is written separately, often first, before data, so file system consistency can be achieved quickly after failure (typically power loss); example of things we care about in OS |
| 38 | program |
executable binary or compilable/interpretable ascii text |
| 39 | process |
in linux, minimum schedulable entity, with a pid and ppid, subdir in /proc, also a program being executed in a state (e.g., running, ready, waiting) |
| 40 | thread |
in linux, a process belonging to a thread group, with a tgid |
| 41 | job |
a program launched at the cli, or an app from the user's point of view |
| 42 | job |
a single-task batch job in older system |
| 43 | task |
a process, thread, or job, almost deliberately ambiguous |
| 44 | process status |
one of D,R,S,T,t,Z, but also could include flags, fg/bg status, etc. |
| 45 | process control block |
information stored on a context switch, including pc, registers, files, etc., most of what is in /proc/pid |
| 46 | context switch (cs) |
when a process is moved on or off a core |
| 47 | migration |
when a process is moved to a different core |
| 48 | voluntary cs |
when a process relinquishes the cpu because of i/o or similar stall |
| 49 | involuntary cs (intr) |
when a process is removed but not because it was a voluntary cs, e.g., time slice expiry |
| 50 | time slice |
current allotment on the core that is running a process, aka time quantum |
| 51 | cooperative multitasking |
all cs's are voluntary |
| 52 | noncooperative multitasking |
cs may be involuntary: preempted task |
| 53 | multiprocessing |
ambiguous, but mostly multi-core computing |
| 54 | multitasking |
somewhat ambiguous, mostly means concurrent or parallel processing (ie, not single job batch) |
| 55 | parallel processing |
using two cores or more at once, wrt wall clock time |
| 56 | concurrent processing |
using at least one core to simulate parallel processing using timeslices, but could include actual parallel processing, or a mix |
| 57 | multiuser |
a system processing tasks associated with multiple users, almost always human, since the normal single user system runs processes under different user ids (uids, e.g. root) |
| 58 | long-term scheduler |
admits jobs into the short-term scheduler |
| 59 | short-term scheduler |
decides which process runs next on each core |
| 60 | dispatcher |
ambiguous, usually the long-term scheduler |
| 61 | ready state |
a process in the ready queue, ready to run on a core |
| 62 | running state |
a process running on a core, typically with an expiring time quantum |
| 63 | load |
a 1-min, 5-min, and 10-min avg of number of processes in the running or ready state; note more cores, lower load for same job mix; more cores, more load for same latency; load of 4+ per core is a medium load |
| 64 | waiting state |
a process no longer running on a core, waiting for an event, typically completion of i/o, possibly queued for i/o |
| 65 | sleeping state |
a process possibly waiting, possibly put to sleep by user or system |
| 66 | suspended state |
a process interrupted by user typically, waiting in background |
| 67 | backgrounded process |
a process running in the background, not suspended, but possibly resumed in the bg after suspension from the fg, can output but not receive input from terminal |
| 68 | daemon |
system processes running in the background (without a terminal for input or output, or without the primary attention of a terminal) |
| 69 | systemd |
typically the pid 1 parent of all system processes, but could be pid > 1000 representing each user login |
| 70 | orphan |
a process whose original ppid has terminated, so its ppid is assigned to systemd |
| 71 | zombie |
a process whose parent has not noticed its (child's) termination, and is waiting to be removed from the system's process table |
| 72 | wait |
explicitly suspends the parent process at a line in code until the child/children terminate/signal |
| 73 | SIGTERM |
sends a signal to a process to terminate elegantly |
| 74 | SIGKILL |
sends a signal to a process to terminate immediately |
| 75 | SIGINT |
the interrupt signal sent by ctrl-c at the terminal |
| 76 | SIGSTOP |
the suspend signal sent by ctrl-z at the terminal |
| 77 | SIGCONT |
the signal sent to a process to resume, typically used by bg to resume in the background (no terminal input, but usually terminal output), or fg to resume in the foreground (both input and output with terminal/tty) |
| 78 | k...d |
a kernel daemon |
| 79 | kernel |
ambiguous, the space, the mode, the classification of process or system interface |
| 80 | kernel space |
the space used by the kernel not accessible by the user program, typically high 1gb in a 32-bit system |
| 81 | kernel mode |
an often hardware-assisted mode of the cpu where it can perform kernel tasks |
| 82 | kernel call |
a low-level routine that runs in kernel mode |
| 83 | system call |
ambiguous, typically a call that switches from user mode to kernel mode |
| 84 | system process |
ambiguous, typically a process associated with the proper functioning of the system (must a server be running sshd? must a webserver be running apached or equivalent?) |
| 85 | kernel process |
a process that starts in kernel mode and stays in kernel mode |
| 86 | microkernel |
an architectural paradigm where as little as possible is done in the kernel; slower, but has security and correctness advantages |
| 87 | monolithic kernel |
the opposite of a microkernel, where a lot of system functions take place in kernel mode |
| 88 | root |
a privileged user in linux |
| 89 | rwx |
read, write, and execute privileges, also s for shared p for private in memory maps |
| 90 | malloc |
a c lib function that calls system brk or mmap functions to create heap space |
| 91 | eager vs lazy |
refers to a system doing immediately vs delaying an action, cf. copy on write; malloc is an example where addresses are typically not given until assignment |
| 92 | memory map |
a listing of virtual address memory areas or segments, aka virtual addresses ("virtual memory" very ambiguous), memory addresses from the process' point of view (prior to mapping/relocating to actual memory), know 32-bit from 64-bit, bf vs ff prefix |
| 93 | aslr |
address space layout randomization of offsets |
| 94 | cat |
at cli, show the file as ascii/printable text; tac will reverse it; shuf will randomize it; more, less, head, and tail also useful as downstream pipes, see also tail -f, tail -n +2, watch -n 1 "tail -10 fname" |
| 95 | pipe |
in cli, a way of taking output from one process and feed it to another, in serial/sequential/linear fashion; a form of inter-process communication (ipc); see also stdin, stdout, stderr |
| 96 | hexdump |
a way of looking at a file in hexadecimal values, esp when non-ascii or non-printable ascii chars are involved |
| 97 | objdump |
a way of disassembling or otherwise inspecting an executable binary to recover x86 instructions |
| 98 | strace and ltrace |
show system calls and library calls during the live execution of a process |
| 99 | srand |
example of a c lib call that seeds the pseudo-random number generator |
| 100 | truncate |
example of a syscall which can be called by a user to invoke kernel functionality; kernel fns called by truncate might include: sys_truncate(), do_truncate(), vfs_truncate(), inode_operations->truncate(), truncate_pagecache(), truncate_inode_pages() |
| 101 | sleep |
another c lib call which then uses syscall nanosleep(), which invokes the kernel fns do_nanosleep(), schedule_hrtimeout(); hr=high resolution |
| 102 | code |
in a memory map, where the r-x binary resides, aka text |
| 103 | text |
maybe just the binary executable code, but maybe also the constant, initialized, and bss parts of a binary, too; rw- and r-- segments are comparable but not 1-to-1 |
| 104 | heap |
any of the possibly noncontiguous heap segments, usually created through malloc or similar; note this is shared across sibling threads, so essentially is shared memory (shm) for the thread group, badly named for dynamic user mempool because it is not managed like a tree data structure |
| 105 | stack |
the call stack, containing user and system functions and the actual parameters |
| 106 | .so |
typically a shared object library segment between heap and stack |
| 107 | static |
not dynamic, not writeable, but beware static pointers in c refer to data, not just pointer address as a data type |
| 108 | char |
the typical 1-byte data type in c; cf. strings as NULL-terminated contiguous chars with a head pointer |
| 109 | buffer overflow |
vulnerability related to limited space for a string (typically) where that space is exceeded, usually in a strcpy, or where the null terminator is not present |
| 110 | int |
the typical 4-byte integer data type in c; see also signed vs unsigned, long, long long, short; overflows of this type cause many problems |
| 111 | %c, %d, %s, %x, %p |
format specifiers for the printf fn in c, see also %03.2f, %-10s |
| 112 | code |
in top, the ram-resident part of the binary |
| 113 | RES |
in top, the total resident memory charged to this process |
| 114 | nTH |
in top, the total number of threads in the thread group of this process |
| 115 | P |
in top, the id of the last core this process ran on |
| 116 | PID |
the process id, some lower numbers reserved for system, uses a circular queue, kernel.pid_max might be lower than 2**bits, 32768 on 32-bit systems; in linux, each thread gets its own PID |
| 117 | PPID |
in top, the pid of the parent process of this process, must be a non-terminated process |
| 118 | fork |
a c lib function used to create a child process through the kernel function clone; copies all memory map to the child, returns child pid to the parent, 0 to the child, then allows divergence esp on the call stack and pc, but also the heap and the data section, any new libs or shared memory |
| 119 | exec |
e.g., execve, a way to replace the code of a running process with a different binary, including r-x, rw-, and r-- segments |
| 120 | pthread_create |
the posix thread create routine that is a modern alternative to fork |
| 121 | sum_exec_runtime |
in /proc/pid/sched, the total number of ms cpu time this process has received, with ns resolution, cf. TIME colmun in top |
| 122 | policy |
the scheduling policy used for this process, typically SCHED_OTHER (policy 0) |
| 123 | policy vs mechanism |
the high level description of desired system behavior wrt some aspect (e.g., resource distribution or contention resolution) vs the more detailed implementation with finer rules and algorithmic details |
| 124 | FIFO/FCFS/RR |
the basic "fair" queueing policy of first come first served, first in first out, round-robin, rejoining the queue at the back once "served", but does not require equal timeslices |
| 125 | SCHED_OTHER |
the normal users level-0 static (PR=20/120) round-robin time-sliced scheduling policy, subject to dynamic priority using nice values |
| 126 | nice |
a value from +19 to -20 that can be applied to the static PR value to create a dynamic PR value; 139 (+19) is the least priority job in the system |
| 127 | SCHED_BATCH and SCHED_IDLE |
alternatives to SCHED_OTHER that are not as interactive or as important |
| 128 | real-time (rt) |
a type of OS or system where deadlines need to be met (soft or hard penalties), e.g. QNX is designed to be an RTOS, linux only has some rt features |
| 129 | real-time (rt) |
a scheduling policy for some processes that require priority over SCHED_OTHER: SCHED_RR and SCHED_DEADLINE will be linux rt policies |
| 130 | original linux scheduler |
refers to round-robin where higher priority jobs run first and with longer timeslices, like a multi-level queue with 139 queues, but all jobs get to run before the next timeslices are handed out (no hi prio starvation of lo prio tasks) |
| 131 | SJF/SRJF/SBF |
strawman (theoretical) scheduling policies that allow students to think about responsiveness and priority |
| 132 | burst |
ambiguous between a cpu burst, an i/o burst (network or disk), or memory burst, a burst of new task creation, but the main capacity-planning concern in system design wrt performance |
| 133 | cpu-bound |
a process that tends to use a lot of cpu, completing its time slices before an i/o or memory stall; also a phas of a process |
| 134 | i/o-bound |
a process that tends not to finish its timeslice because it requests i/o (not memory?) and is preempted by the system |
| 135 | overhead |
time spent by the system that is not considered useful work though may be essential to apply policy/mechanism |
| 136 | system time |
time accounted (charged) to the system, cf. user time; both are typically cpu time, not wall clock time |
| 137 | throughput |
number of jobs completed per time measure by a system, e.g., 140 tasks/second |
| 138 | bandwidth |
an upper limit of throughput, especially in flows such as networking, e.g., 100Gbits/sec |
| 139 | response time |
somewhat vague measure of the time it takes for the system to respond to an event, usually of concern to a user, usually a human user, vague because some "responses" take more time than trivial acknowledgement; mostly the time in queue waiting for a first cpu timeslice after user input; cf. first meaningful page impression in web response time; closely related to latency |
| 140 | turnaround time |
the time it takes to move a job/task/process from creation/admission to completion/termination |
| 141 | fairness |
in scheduling, the idea that jobs/tasks/processes should not be starved |
| 142 | fairness measure |
a quantification of fairness that attempts to measure a meaningful lack of fairness |
| 143 | Jain's fairness measure |
a normalized squared-sum approach to a set of allocations that aims for equitable distribution |
| 144 | starvation |
ambiguous because one can be starved for 1s, or .001s, but this is the time a process spends in the ready queue without being selected, and implies that it is notable |
| 145 | Loui's fairness suggestion |
measure fairness in terms of appropriate asymmetry, starvation of processes by their peers (or lower prio), not by higher priorty processes |
| 146 | MLFQ |
multi-level feedback queue, where processes start with high priority, getting preemptive service with short timeslices, then fall as they use up their allotments |
| 147 | aging |
promoting older low prio processes to higher priority on occassion, aka age-based priority boost |
| 148 | preemption |
two types: in os, mainly premature removal of a process from the cpu (or other resource) because of the arrival or other suddden service of a higher prio process; in queueing generally, moving a high prio job ahead of another so it can be selected first, or earlier, cf. queue discipline |
| 149 | kworker |
a system process that is a kernel worker thread per cpu, name encodes its CPU affinity (if any), an id, its niceness (if any) and the workqueue name or description |
| 150 | migration |
a per cpu system & kernel process that handles moving a process from one core to another (probably handling cache issues), example of a rt process |
| 151 | watchdog |
per cpu system & kerneal process that checks for system health like cpu temp and can trigger immediate shutdown, example of a rt (policy scheduled) process; records and can reset/reboot; Loui thinks this is where cyberphysical systems should monitor sensor integrity so planes stop crashing |