CMPSC 473 Final Spring 2026

0.0(0)
Studied by 3 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/351

flashcard set

Earn XP

Description and Tags

gl || 5/6/26: Currently only contains Lectures 9 through 29

Last updated 11:02 PM on 5/6/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

352 Terms

1
New cards
LECTURE 2 (Answer is 90)
90
2
New cards
Structure alignment is ordered according to ___
declaration
3
New cards
Header files
Files that typically contain definitions, like structures and function prototypes, for a program
4
New cards
Source files
Files that typically contain the actual implementation for a program
5
New cards
(T/F) static const int CONSTANT = 1 is better than #define CONSTANT 1
T
6
New cards
LECTURE 3 (Answer is 224)
224
7
New cards
Virtualization
Hides hardware details and offers programs easier interfaces to work with
8
New cards

Control program

A role of the OS that controls the execution of programs to prevent errors and improper computer use

9
New cards
What three functionalities does an OS offer?
Virtualization, resource allocation, control program
10
New cards
Process
A bundle of resources in an address space
11
New cards
ASLR
Address Space Layout Randomization, which changes the memory locations randomly whenever we re-run a program
12
New cards
(T/F) A single application always contains only one process
F
13
New cards
LECTURE 4 (Answer is 141)
141
14
New cards
System call
A request from a user program to the kernel to perform a privileged operation via a trap into kernel mode
15
New cards
Trap
A synchronous control transfer to the kernel triggered by the execution of an instruction (e.g., exception, error, or system call).
16
New cards
Trap table
A table storing addresses of OS handlers for traps
17
New cards
What are the two major modes CPUs run in dual CPU mode?
User mode and OS/Kernel mode
18
New cards
What about the user mode differs it from the kernel mode?
Cannot execute privileged instructions
19
New cards
Interrupt
An asynchronous control transfer to the kernel triggered by an external hardware event (e.g., timer or I/O device).
20
New cards
Signal
An asynchronous notification delivered by the kernel to a user process, informing it of an event (e.g., error or external request), handled in user space.
21
New cards
What’s the signal sent by the OS in case of a segmentation fault?
SIGSEGV
22
New cards
(T/F) Traps can be triggered by executing privileged instructions in the user mode
T
23
New cards
(T/F) Mode bits indicate whether the CPU is in kernel or user mode
T
24
New cards
(T/F) While in the user mode, it’s possible to access privileged instructions directly
F
25
New cards
(T/F) All CPUs share the same set of interrupts
F
26
New cards
(T/F) The CPU has access to a table containing addresses of interrupt handles populated by the OS
27
New cards
(T/F) Both traps and interrupts allow entering the kernel mode from the user mode
T
28
New cards
(T/F) Signals are delivered directly by hardware to a process
F
29
New cards
(T/F) A page fault is a type of trap
T
30
New cards
(T/F) A page fault is a type of interrupt
F
31
New cards
(T/F) Signals can only be generated by the OS
F
32
New cards
(T/F) An interrupt can cause a signal to be sent to a process
T
33
New cards
(T/F) If a process divides by zero, the CPU raises a trap
T
34
New cards
LECTURE 5 TO 8 (Answer is 1)
1
35
New cards
Explicit allocator
When the programmer allocates and frees space
36
New cards
Implicit allocator
When the programmer allocates but does not free space, which is done automatically
37
New cards
malloc(size)
If successful, returns a pointer to a memory block of at least size bytes, otherwise returns error
38
New cards
free(ptr)
Frees a previously malloc’ed or realloc’ed block back to the pool of available memory
39
New cards
realloc(ptr, size)
If successful, changes the size of a previously allocated block
40
New cards
Void pointer
A pointer with no associated data type, must be typecast before dereferencing
41
New cards
Aggregated payload
The sum of currently allocated payloads
42
New cards
Internal fragmentation
When an allocated block has unused space inside itself
43
New cards
What three things can cause internal fragmentation?
Overhead of maintaining heap data structures, padding for alignment purposes, and explicit policy decisions
44
New cards
External fragmentation
When there’s enough aggregate heap memory available, but no single free block is enough
45
New cards
Implicit list allocation
Tracking all blocks, including free blocks, by using the size metadata of each block to effectively store them in a single linked list
46
New cards
Explicit list allocation
Tracking free blocks by using their next/prev blocks to traverse between free blocks, effectively storing them in doubly linked lists
47
New cards
Segregated free list allocation
Tracking free blocks by using the explicit list allocation and splitting its free list into different size classes
48
New cards
Coalescing
The act of joining two free data blocks together
49
New cards
What are two coalescing policies?
Immediate coalescing and deferred coalescing
50
New cards
What are two insertion policies for storing free lists using explicit lists?
LIFO and address-ordered
51
New cards
LIFO stands for…
Last In First Out
52
New cards
(T/F) Applications can issue an arbitrary sequence of malloc and free requests
T
53
New cards
(T/F) Allocators can control the amount and/or size of allocated blocks
F
54
New cards
(T/F) Allocators can manipulate and modify only allocated memory
F
55
New cards
(T/F) Allocators can move allocated blocks even after they’re malloc’ed
F
56
New cards
(T/F) The pattern of previous requests affects internal fragmentation
T
57
New cards
(T/F) The pattern of future requests affects external fragmentation
T
58
New cards
LECTURES 9 TO 11 (answer is 20)
20
59
New cards
Virtual Memory Benefits
Uses main memory efficiently, simplifies memory management, isolates address spaces
60
New cards
Pages
Cache blocks containing the contents of the virtual memory
61
New cards
DRAM cache
Another name for physical memory
62
New cards
Size of a page
2^p bytes where p is number of bits representing a page offset
63
New cards
DRAM uses the ____ cache write strategy
write-back
64
New cards
Write-back caching strategy
Writing to the cache copy, modified data gets marked dirty, written to memory later
65
New cards
Dirty bit
Indicates whether or not a page has been modified in memory, used in write-back caching
66
New cards
Write-through caching strategy
Writing to the cache and the memory at the same time
67
New cards
Page table
Array of Page Table Entries that maps virtual pages to physical pages
68
New cards
Page hit
When a requested virtual page is already stored in the physical memory (DRAM cache hit)
69
New cards
Page fault
When a requested virtual page is not stored in the physical memory (DRAM cache miss)
70
New cards
Page fault handler
When a page fault happens, selects a victim page, evicts it from the DRAM cache if needed, then loads the missing page into memory
71
New cards
ASLR
Address Space Layout Randomization randomizes address for security
72
New cards
How does virtual memory affect loading?
Demand paging: creates invalid PTEs and only loads pages from the executables when accessed
73
New cards
How does virtual memory affect linking?
Programs have the same virtual addresses across all programs
74
New cards
How does virtual memory enable protection?
Using PTE permission bits, which the MMU checks on every access
75
New cards
MMU
Memory Management Unit that translates virtual addresses to physical addresses
76
New cards
VPN
Virtual Page Number: Identifies which virtual page you’re in, indexes the page table
77
New cards
VPO
Virtual Page Offset: Identifies the byte within a found page, doesn’t change during translation
78
New cards
PPN
Physical Page Number: Identifies which physical page you’re in
79
New cards
PTBR
Page table base register: A register that points to the current process’s page table in memory
80
New cards
Physical address can be built from…
PPN + VPO
81
New cards
Locality
Programs tend to access a small set of memory locations repeatedly over short periods of time
82
New cards
Working set
The set of virtual pages being used by a program during a given time period
83
New cards
Page Table Entry contains…
Validity/permission bit, PPN
84
New cards
TLB
Translation Lookaside Buffer, a small hardware cache in the MMU that stores some PTEs, allowing for faster translation
85
New cards
How is the TLB derived from a virtual address?
It’s derived from the VPN portion of a virtual address, splitting it into TLBT and TLBI
86
New cards
TLBT
Translation Lookaside Buffer Tag, selects the tag of the entry within the set
87
New cards
TLBI
Translation Lookaside Buffer Index, selects the set in the TLB
88
New cards
Multi-level Page Table
A page table that breaks a single PT into multiple levels, so only portions are allocated in memory
89
New cards
How many bits does a VPO take?
Number of offset bits
90
New cards
How many bits does a VPN take?
Number of total bits in the virtual address minus the number of offset bits
91
New cards
How many sets does a TLB have?
2^Number of TLB Index bits
92
New cards
When the total active virtual memory usage (total working set) exceeds physical memory…
thrashing occurs, a performance meltdown where pages are swapped in and out continuously
93
New cards
(T/F) Each process has its own virtual address space
T
94
New cards
(T/F) The entire system has its own page table
F
95
New cards
(T/F) The page table is stored in the user space
F
96
New cards
(T/F) Each virtual page can be mapped to any physical page
T
97
New cards
(T/F) Once mapped, a virtual page must always be in the same physical page at different times
F
98
New cards
(T/F) Virtual memory allows address space larger than physical memory
T
99
New cards
(T/F) The TLB is set-associative
T
100
New cards
(T/F) The TLB is direct-mapped
F