CMPSC 311 | Exam 2 (Spring 2025)

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/233

flashcard set

Earn XP

Description and Tags

Notes

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

234 Terms

1
New cards

Hypervisor

virtual machine monitor

2
New cards

Operating system (OS)

software that manages machine hardware, provides interface with said hardware, and provides abstractions that system software can build upon

3
New cards

Type 1 Hypervisor

a hypervisor that runs on the host machine

4
New cards

Type 2 Hypervisor

a hypervisor that runs on the operating system

5
New cards

Layer

collection of system functions that support abstractions to services/apps above

6
New cards

Abstraction

The process of hiding and simplifying unnecessary or messy details into something more readable and/or ergonomic

7
New cards

Process

structures that form independent programs running concurrently within OSes

8
New cards

File

An abstraction of a data object

9
New cards

Data file

A type of file to be used for interpretation and manipulation from a program

10
New cards

Virtual memory

A combination of memory addresses and disk addresses to create “more memory” than physically possible

11
New cards

Word size

Number of bits processed simultaneously by a computer’s processor or memory

12
New cards

Address

Unique identifiers for byte locations in memory

13
New cards

Applications programmer interface (API)

A set of methods used to manipulate an abstraction; a library of calls that use the abstraction

14
New cards

Low-level language

A programming language that has low amounts of abstraction and is overall higher performance, more control of system hardware

15
New cards

High-level language

A programming language that is built for productivity and ease of access rather than performance, more useful for system software

16
New cards

GNU

One of the collections of softwares to be used within operating systems

17
New cards

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

18
New cards

System call

A call from user-level processes that allow them to safely enter the OS and call methods from it

19
New cards

Unprivileged (User) mode

The mode that the CPU runs in when user-level processes run

20
New cards

Privileged (Kernel) mode

The mode that the CPU runs in when the OS runs

21
New cards

Application

A complete program for ordinary users

22
New cards

Application library

An application-specific tool

23
New cards

Command interpreter/shell

Shell program that interpets built-in commands and can run programs and shell scripts

24
New cards

System utility

Tools that are independent from applications, used to tune system software

25
New cards

Device driver

Program that implements an interface to real hardware, such as mice or keyboards

26
New cards

Kernel module

A software module that can be loaded and unloaded on a system, increasing a kernel’s functionality without needing recompilation

27
New cards

Command line interface

The user interface within a terminal

28
New cards

/usr

In Linux: installed software

29
New cards

/etc

In Linux: configuration files

30
New cards

/home

In Linux: user files

31
New cards

/dev

In Linux: devices and their files

32
New cards

/tmp

In Linux: temporary files

33
New cards

Root

The “super user” within Linux, can access any file

34
New cards

su

This CLI command that, upon verification, grants administrative privileges

35
New cards

sudo

This CLI command that temporarily gives administrative privileges without the requirement of logging in as root

36
New cards

ls

This CLI command lists files and directories within the current directory

37
New cards

mv

This CLI command renames files, as well as move files between directories

38
New cards

rm

This CLI command removes a given file from existence

39
New cards

rmdir

This CLI command removes an empty directory from existence

40
New cards

rm -r

This CLI command removes the current directory and all its contained files from existence

41
New cards

cat

This CLI command reads the contents of a given file (STDIN) and prints to terminal (STDOUT)

42
New cards

touch

This CLI command creates a file with the given name and an optional file extension

43
New cards

pwd

This CLI command prints out the current working directory

44
New cards

cd

This CLI command moves the current working directory

45
New cards

mkdir

This CLI command creates a new directory within the current directory

46
New cards

cd ..

This CLI command moves the current working directory to the parent directory if it exists

47
New cards

man

This CLI command prints out documentation for a given command (others similar command are help and tldr)

48
New cards

Binary file

A separate program executed by the shell

49
New cards

/lib

Location of shared library files used by core systems programs

50
New cards

/sbin

Location of system binaries for vital system tasks

51
New cards

Alias (term)

Shortcut defined by a user to avoid typing long commands or command sequences

52
New cards

> (within CLI)

Within the CLI this operator redirects the output or error of a command by overwriting a file

53
New cards

>> (within CLI)

Within the CLI this operator redirects the output or error of a command by appending to a file

54
New cards

< (within CLI)

Within the CLI this operator reads an input from a file rather than the standard input (which usually is the keyboard)

55
New cards

cp

This CLI command copies the contents of one file into another file

56
New cards

history

This CLI command lists the history of all commands since system startup

57
New cards

alias (CLI command)

This CLI command creates an alias that can be used as a shortcut for inputting multiple commands

58
New cards

echo

This CLI command prints a given string of text within the terminal STDOUT

Syntax: command “string”

59
New cards

ls -a

This CLI command lists the contents of the directory including usually hidden dot files

60
New cards

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

61
New cards

const

A variable modifier in C that makes a variable’s value final and unchangeable

62
New cards

&[variablename]

This C operator takes the address of a variable rather than its value

63
New cards

*[variablename]

This C operator “dereferences” a pointer, giving access to the pointed variable’s value

64
New cards

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

65
New cards

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

66
New cards

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

67
New cards

String

An array of char, terminated by the string \0. Can be initialized with char as well.

68
New cards

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)

69
New cards

free()

Frees up memory that was heap-allocated/manually allocated

Syntax: function(*pointer)

70
New cards

assert()

Checks for statements in the code that must always be true, where the process aborts if is not true; syntax function(expression)

71
New cards

Debugger

A program that runs your program within a controlled environment

72
New cards

GDB (Term)

The GNU Debugger

73
New cards

gdb (CLI command)

Runs the GDB debugger, has syntax function(program)

74
New cards

run (GDB command)

Within GDB, starts the program; arguments can be passed down to this function

Syntax: function (arguments)

75
New cards

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)

76
New cards

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

77
New cards

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)

78
New cards

delete (GDB command)

Within GDB, deletes a breakpoint

Syntax: function (breakpoint_ID)

79
New cards

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)

80
New cards

info breakpoints (GDB command)

Within GDB, allows the user to see information about their current breakpoints

81
New cards

save breakpoints (GDB command)

Within GDB, lets the user save their current breakpoints to a file for later use

Syntax: function (file name)

82
New cards

source (GDB command)

Within GDB, lets the user load saved breakpoints for use

Syntax: function (file name)

83
New cards

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

84
New cards

watch (GDB command)

Within GDB, creates a watchpoint for a specific variable

Syntax: function (variable name)

85
New cards

where (GDB command)

Within GDB, tells the user where they are in the command, along with a stack

86
New cards

up (GDB command)

Within GDB, moves up the stack

87
New cards

print (GDB command)

Within GDB, prints the value of any variable in the program.

Syntax: function[/(format)] (variable)

88
New cards

x (GDB command)

Within GDB, examines regions of memory given an address

Syntax: function[/<num><format><size>] address

89
New cards

next (GDB command)

Within GDB, moves the program forward one statement

90
New cards

step (GDB command)

Within GDB, moves the program forward one statement, and steps into a function if applicable

91
New cards

continue (GDB command)

Within GDB, runs the program until it hits another breakpoint or the program ends

92
New cards

finish (GDB command)

Within GDB, runs the function until it returns a value

93
New cards

Box & Arrow Diagrams

Method where all variables, pointers, array elements, etc. are listed in a table

94
New cards

Buffer

A memory region that has some temporary use, typically referenced through a pointer.

95
New cards

General purpose buffer

A buffer defined with type void, doesn’t have a data type and requires casting for access to its data

96
New cards

memcpy()

Copies memory from one region to another

Syntax: function(*dest, *src, length); length must be explicit

97
New cards

memset()

Fills memory with a constant given byte

Syntax: function(*buf, byteVal, length)

98
New cards

memcmp()

Compares the first length bytes of two buffers; negative if buf1 is less than buf2, and so on

Syntax: function(*buf1, *buf2, length)

99
New cards

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

100
New cards

sizeof()

Returns the size (in bytes) of the variable given

Syntax: function(variable)