Assignment Learning Outcomes
Ensure you feel you have learned all that is expected from each assignment. The learning outcomes listed below should help focus your review.
A0: Linux Terminal
Expand for learning outcomes...
- Able to correctly apply the following Linux ideas and commands to operate in the terminal:
ls; know arguments like-l,-a- Paths: relative and absolute,
pwd,cd,~,.and.. - Hidden files (
.at start of filename);file man, and search inside man page with\<search-term>,nfor next,qto quit.mkdir,rmdirtouch,cp,mv,rm/rm -rcat,less- Terminal Wildcards:
*,?,[sv]* - File permissions: owner, group, others; r,w,x;
chmod.- Don't need to memorize permission shorthand (octal or binary).
head,tail; know arguments likehead -10ortail -5 myfile.txtsort,nl,wc(with arguments-l,-w,-m)top,ps,killsleep,fg
- Understand regular expressions
egrep.,[abc],[^abc],[a-z],^,$[a-z]{2}+,*,{n}
- Able to use piping and redirecting:
- stdin (0), stout (1), stderr (2)
>,>>,<,2>|
- Understand basic
gitworkflow including the purpose of the following commands:git clonegit addgit commitgit push
A1: NeoVim
Expand for learning outcomes...
Know NeoVim ideas and commands including:
nvim <filename>- Command mode vs insert (entry) mode; how to transition between them.
- Know which is the default mode you should be in most of the time you are working with code.
- Save/Quit:
:w,:q,:wq,:q! - Navigate:
j,k,h,l,^,$,w,b,{,} - Deleting Content:
dd,x,dw,d5w - Undo/Redo:
u,ctrl+r,U - Inserting text:
i,A,a,o,O - Visual/Yank/Put:
v,y,p,P
A2: Bash Scripting
Expand for learning outcomes...
Able to read, write, and understand bash scripts featuring:
- Shebang (
#!/bin/bash) - Comments
- Command line arguments (
$#,$0,$1,$2, ...) - Variables:
$RANDOM,myvar=51,$myvar,read varname grep "hi[a-z]\{10\}"v=$( ls | wc )echocat /dev/stdin | sort- Math:
let "a = 5 + 4",let a++,b=$(( 5 + 4 )),((i++)), `c=$(( count % 2 == 0)) - Branching and Logic:
if [ $a -gt 100 ],then,fielse;elif;&&,||- Tests:
-n,=,-eq,-gt,-lt
- Loops:
while [...],do,donefor myvar in <list>,do,donefor i in {1..5}, orfor ((num = 1; num <= 5; num++))break,continue
A3: Compilation
Expand for learning outcomes...
- Know what happen (generally) during pre-processing, compiling, and linking steps.
- How to use
clangto:- Compile a single .c file
- Compile multiple .c files and .h files.
- Generate object files (
-o). - Link multiple object files into an executable.
- Understand static libraries vs shared libraries.
- Know what a shared library's name means, like
libpthread.so.0. - Know how to use
arto generate an archive. - Know the
-land-Larguments toclang. - Know the
LD_LIBRARY_PATHenvironment variable.
- Know what a shared library's name means, like
- Understand the following compiler options:
-I,-g,-Wall,-Werror,-Weverything,-Wextra,-fsanitize=...,-O1,-O2,-O3
A4: Make & CMake
Expand for learning outcomes...
Know the following about build systems:
- Purpose of a modern build system.
- Make
- Know how to create a Makefile including using targets, prerequisites,
- Understand and able to write
make clean, andmake all - Use variables
x := myfile.c,echo ${x} - Able to use wildcards
*and% - Know about the implicit rules, but don't have to memorize them.
- CMake
- Know the process for how CMake fits into build system with Make.
- Know the 3 required components of a CMakeLists.txt, and how to use each.
- Know the role of
build/, and commands to build in this folder (both from insidebuild/, and from inside the project root directory). - Understand
include_directories(...)andfile(GLOB SOURCES "src/*.c")
A5: Debugging Tools
Expand for learning outcomes...
- Logging
- Know the purpose of log statements.
- Understand how to use
log.clogging library (you don't have to memorize it, but if provided, you should be able to use it).
- Assertions
- Know the purpose of
assertstatement with regard to verifying preconditions and postconditions. - Able to write C code using
assert.
- Know the purpose of
- Static Checkers & Sanitizers
- Know the difference between static and dynamic checkers.
- Know the purpose of a linter and a sanitizer.
- Understand how to enable Clang's sanitizers.
- Fuzzers
- Know the purpose of using a fuzzer.
- Understand how to use LibFuzzer (but not memorized).
- Debuggers
- Know the purpose of a debugger.
- Know how to use
cgdb, including:- Compiling with debug information (
-g) - Set breakpoint with
break <...> - Run/step:
run,step,next,continue - View info:
print,list - Watchpoints:
watch <var> quit
- Compiling with debug information (
A6: Memory Layout
Expand for learning outcomes...
- Know the memory layout table.
- Know what pointers store and how they operate.
- Know pointer arithmetic vs non-pointer arithmetic.
- Know pointers and arrays are interchangable; able to use them as such in C.
- Understand the text segment: what it contains, how we can read it.
- Understand
objdump
- Understand
- Understand Data and BSS segments: what they contain, how we can read them.
- Able to view addresses of variables in Data and BSS, and interpret layout.
- Know the difference between Data and BSS segments.
- Understand the stack segment
- Know how arrays and variables are laid out in memory.
- Understand how array access works and how out of bounds access works.
- Function calls
- Know how the stack grows and shrinks with stack frames from function calls.
- Know what goes into a stack frame.
- Understand what a stack buffer overflow attack is, and why we should never use
gets(). - Understand purpose of
getrlimit().
A7: Memory Alignment
Expand for learning outcomes...
- Understand what happens when a user program accesses the kernel memory space.
- Know where shared libraries are loaded in memory.
- Know what
malloc(),calloc(),realloc(), andfree()do. - Know the use of pointers for dynamic memory allocation (using
malloc(),free(), etc.). - Know why the heap memory management is considered manual.
- Know how memory leak can occur, why it is a problem, and how to avoid it.
- Understand memory safety issues.
- Understand how raw bytes are represented in memory (endianness), and how different data types are represented in memory (e.g., int, float, double, char, struct).
- Understand the concept of memory alignment, padding, and packing.
A8: Shell
Expand for learning outcomes...
- C Skills
- Able to read input from the keyboard and split it into tokens using
strtok_r(). - Able to work with strings: copy, length, print.
- Able to work with a fixed size array storing strings for history:
- manage allocated space,
- manage full vs not full array,
- manage strings in memory (copying string or moving pointer).
- Able to effectively use dynamically allocated memory safely and free memory. Able to use memory sanitizer feature in compiler.
- Able to read input from the keyboard and split it into tokens using
- Process Management Skills
- Able to take a user's string input and launch a process with arguments in a new process.
- Able to launch a process in the background.
- Able to cleanup zombies effectively.
- Linux programming
- Able to manage the program's current working directory.
- Able to work with the user's home folder. No need to memorize
getuid()orgetpwuid().
- Signals
- Able to register a signal handler for
SIGINT(if given function prototypes and necessary structs). - Able to write a signal handler that prints a message to the screen safely (signal safe).
- Able to register a signal handler for
- General
- Able to compile and run a
gtestprogram, like you had to do in the assignment. Understand its output. You don't need to writegtestprograms. - Able to use CMake to compile and run a multifile project.
- Able to compile and run a
A9: Memory Manager
Expand for learning outcomes...
- Understand how client code can use
alloc(),dealloc(), andallocopt().- Understand how the provided test code exercises these functions. No need to fully understand details of gtest.
- Able to use
allocinfo()if given thestruct allocinfo.
- Allocation
- Able to understand and implement use of
sbrk()to create more memory. - Know the
struct header: its size, its purpose, and where it is placed for allocated and unallocated blocks. - Able to understand and implement removing free blocks from the linked list according to the three allocation algorithms:
FIRST_FIT,BEST_FIT, andWORST_FIT. - Able to understand and implement splitting free blocks, and know how header size impacts splitting.
- Able to understand and implement use of
- Deallocation
- Able to understand and implement adding free blocks to the linked list.
- Able to understand and implement coalescing of free space.
- Resetting
- Able to understand and implement
allocopt()and how it resets the allocated space back to the initial point.
- Able to understand and implement
A10: Map Reduce
Expand for learning outcomes...
- Understand the three-stage MapReduce algorithm including what each stage takes as input, its job, and what it produces as output.
- Able to analyze an example use of the MapReduce algorithm.
- Understand how to work with pointers to pass different threads part of an array.
- Able to use POSIX threads: create, join.
- Able to use POSIX mutexes.
- Able to use function pointers: write code for declaring variable, passing to function, calling.
- Note: Use of the uthash library is recommended but not required, therefore it is not a required learning outcome.
A11: Group Chat - Networking
Expand for learning outcomes... (TBA)
- TBA
A12: Blockchain
Expand for learning outcomes... (TBA)
- TBA