1/233
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Hypervisor
virtual machine monitor
Operating system (OS)
software that manages machine hardware, provides interface with said hardware, and provides abstractions that system software can build upon
Type 1 Hypervisor
a hypervisor that runs on the host machine
Type 2 Hypervisor
a hypervisor that runs on the operating system
Layer
collection of system functions that support abstractions to services/apps above
Abstraction
The process of hiding and simplifying unnecessary or messy details into something more readable and/or ergonomic
Process
structures that form independent programs running concurrently within OSes
File
An abstraction of a data object
Data file
A type of file to be used for interpretation and manipulation from a program
Virtual memory
A combination of memory addresses and disk addresses to create “more memory” than physically possible
Word size
Number of bits processed simultaneously by a computer’s processor or memory
Address
Unique identifiers for byte locations in memory
Applications programmer interface (API)
A set of methods used to manipulate an abstraction; a library of calls that use the abstraction
Low-level language
A programming language that has low amounts of abstraction and is overall higher performance, more control of system hardware
High-level language
A programming language that is built for productivity and ease of access rather than performance, more useful for system software
GNU
One of the collections of softwares to be used within operating systems
Open source
Describes when a user of the source is allowed to review, modify, and distribute software with no cost to anyone; variants of this can allow charging for derivative works
System call
A call from user-level processes that allow them to safely enter the OS and call methods from it
Unprivileged (User) mode
The mode that the CPU runs in when user-level processes run
Privileged (Kernel) mode
The mode that the CPU runs in when the OS runs
Application
A complete program for ordinary users
Application library
An application-specific tool
Command interpreter/shell
Shell program that interpets built-in commands and can run programs and shell scripts
System utility
Tools that are independent from applications, used to tune system software
Device driver
Program that implements an interface to real hardware, such as mice or keyboards
Kernel module
A software module that can be loaded and unloaded on a system, increasing a kernel’s functionality without needing recompilation
Command line interface
The user interface within a terminal
/usr
In Linux: installed software
/etc
In Linux: configuration files
/home
In Linux: user files
/dev
In Linux: devices and their files
/tmp
In Linux: temporary files
Root
The “super user” within Linux, can access any file
su
This CLI command that, upon verification, grants administrative privileges
sudo
This CLI command that temporarily gives administrative privileges without the requirement of logging in as root
ls
This CLI command lists files and directories within the current directory
mv
This CLI command renames files, as well as move files between directories
rm
This CLI command removes a given file from existence
rmdir
This CLI command removes an empty directory from existence
rm -r
This CLI command removes the current directory and all its contained files from existence
cat
This CLI command reads the contents of a given file (STDIN) and prints to terminal (STDOUT)
touch
This CLI command creates a file with the given name and an optional file extension
pwd
This CLI command prints out the current working directory
cd
This CLI command moves the current working directory
mkdir
This CLI command creates a new directory within the current directory
cd ..
This CLI command moves the current working directory to the parent directory if it exists
man
This CLI command prints out documentation for a given command (others similar command are help and tldr)
Binary file
A separate program executed by the shell
/lib
Location of shared library files used by core systems programs
/sbin
Location of system binaries for vital system tasks
Alias (term)
Shortcut defined by a user to avoid typing long commands or command sequences
> (within CLI)
Within the CLI this operator redirects the output or error of a command by overwriting a file
>> (within CLI)
Within the CLI this operator redirects the output or error of a command by appending to a file
< (within CLI)
Within the CLI this operator reads an input from a file rather than the standard input (which usually is the keyboard)
cp
This CLI command copies the contents of one file into another file
history
This CLI command lists the history of all commands since system startup
alias (CLI command)
This CLI command creates an alias that can be used as a shortcut for inputting multiple commands
echo
This CLI command prints a given string of text within the terminal STDOUT
Syntax: command “string”
ls -a
This CLI command lists the contents of the directory including usually hidden dot files
Object file
A file that contains machine code produced by a compiler, will be linked in a later process to be turned into an executable file
const
A variable modifier in C that makes a variable’s value final and unchangeable
&[variablename]
This C operator takes the address of a variable rather than its value
*[variablename]
This C operator “dereferences” a pointer, giving access to the pointed variable’s value
Pass-by-value
This term describes when a variable’s value is passed into a function, which bars the function from modifying that variable directly
Pass-by-reference
This term describes when a variable’s address is passed into a function, allowing that variable to be modified within the function
Array
A way to store multiple values in a single variable, though it has no methods and can’t keep track of its own length
String
An array of char, terminated by the string \0. Can be initialized with char as well.
malloc()
Allocates memory for program usage; returns NULL if memory can’t be allocated, else returns a void pointer corresponding to the first byte of the memory allocated
Syntax: function(size)
free()
Frees up memory that was heap-allocated/manually allocated
Syntax: function(*pointer)
assert()
Checks for statements in the code that must always be true, where the process aborts if is not true; syntax function(expression)
Debugger
A program that runs your program within a controlled environment
GDB (Term)
The GNU Debugger
gdb (CLI command)
Runs the GDB debugger, has syntax function(program)
run (GDB command)
Within GDB, starts the program; arguments can be passed down to this function
Syntax: function (arguments)
list (GDB command)
Within GDB, shows ten lines of code at a time given a line number or a function name
Syntax: function (line number or function name)
Breakpoint
A position in the code you wish for a debugger to stop and wait for your commands; each one is assigned a number to be referenced later
break (GDB command)
Within GDB, creates a breakpoint; each one is assigned a number that can be referenced later
Syntax: function (function_name) OR function (line_number)
delete (GDB command)
Within GDB, deletes a breakpoint
Syntax: function (breakpoint_ID)
cond (GDB command)
Within GDB, modifies a given breakpoint such that it will only call the debugger if the condition is true (i.e. a conditional breakpoint)
Syntax: function (breakpoint_ID) (expression)
info breakpoints (GDB command)
Within GDB, allows the user to see information about their current breakpoints
save breakpoints (GDB command)
Within GDB, lets the user save their current breakpoints to a file for later use
Syntax: function (file name)
source (GDB command)
Within GDB, lets the user load saved breakpoints for use
Syntax: function (file name)
Watchpoint
This stops execution and calls the debugger whenever the state of a specific variable changes, without a particular place where it happens. Also known as a data breakpoint
watch (GDB command)
Within GDB, creates a watchpoint for a specific variable
Syntax: function (variable name)
where (GDB command)
Within GDB, tells the user where they are in the command, along with a stack
up (GDB command)
Within GDB, moves up the stack
print (GDB command)
Within GDB, prints the value of any variable in the program.
Syntax: function[/(format)] (variable)
x (GDB command)
Within GDB, examines regions of memory given an address
Syntax: function[/<num><format><size>] address
next (GDB command)
Within GDB, moves the program forward one statement
step (GDB command)
Within GDB, moves the program forward one statement, and steps into a function if applicable
continue (GDB command)
Within GDB, runs the program until it hits another breakpoint or the program ends
finish (GDB command)
Within GDB, runs the function until it returns a value
Box & Arrow Diagrams
Method where all variables, pointers, array elements, etc. are listed in a table
Buffer
A memory region that has some temporary use, typically referenced through a pointer.
General purpose buffer
A buffer defined with type void, doesn’t have a data type and requires casting for access to its data
memcpy()
Copies memory from one region to another
Syntax: function(*dest, *src, length); length must be explicit
memset()
Fills memory with a constant given byte
Syntax: function(*buf, byteVal, length)
memcmp()
Compares the first length bytes of two buffers; negative if buf1 is less than buf2, and so on
Syntax: function(*buf1, *buf2, length)
Dynamic memory
Memory that is allocated and returned by a function, where its size isn’t known by the caller; memory must be deallocated manually
sizeof()
Returns the size (in bytes) of the variable given
Syntax: function(variable)