This is a general outline of the key concepts (arranged by topic) that you should know for the Exam 03.
The exam will have the following format:
Code Snippets: Write Shell commands or Python code to perform certain tasks. (4 Points)
Short Answers: Briefly answer questions about:
Unix Philosophy (3 Points)
Compiler Pipeline (5 Points)
Memory Allocation (4 Points)
Data Structures (6 Points)
Memory Errors (6 Points)
Files (5 Points)
Processes (6 Points)
Networking (5 Points)
Programming: Write some C code that uses system calls. (6 Points)
The final exam will be a comprehrensive assessment. This means that everything we have discussed this semester is considered fair game.
That said, the majority of the test will cover the last quarter of the class, as detailed below.
What is Unix?
What are the three tenets of the Unix Philosophy?
What are filters? What do they do and how are they related to the Unix Philosophy?
What are the principles of functional programming?
How does functional programming compare to procedural programming?
How does functional programming compare to object-oriented programming?
What is concurrency and what is parallelism?
What makes concurrency challenging?
What are the different forms of parallelism?
How do you construct a unix pipeline to do the following:
Extract a fields or characters.
Search based on a pattern.
Count the number of lines.
Search a directory based on a pattern or file attribute.
List the processes on the current machine.
How do you use list comprehensions?
What is the compiler pipeline?
What exactly happens when you compile a program (ie. describe the compiler pipeline)?
What is the difference between a dynamic executable and a static executable?
What is the difference between a shared library and a static library?
How do you write a Makefile that utilizes rules and variables for a program that consists of multiple files?
How much memory is allocated when we declare an int
, float
,
double
, char
, array, string, or pointer?
When we declare a variable, where is the data allocated (stack, heap, data, code)?
How do we dynamically allocate memory? How do we deallocate that memory?
How do we detect and fix memory errors such as: segmentation faults, invalid reads, uninitialized memory, and memory leaks?
What is singly-linked list?
How would we insert an entry into a linked list?
How would we search for an entry in a linked list?
How would we remove an entry in a linked list?
What are the time and space complexities of the insert, search, and remove operations?
What is hash table?
What is a collision?
How does separate chaining handle a collision?
How does load factor impact the performance of a hash table?
What are the time and space complexities of the insert, search, and remove operations?
What exactly are system calls?
What is the difference between user mode and kernel mode?
What happens when an application performs a system call?
What are some reasons why system calls related to files, processes, and networking would fail?
How do we check these failures?
How do we get the error message related to these failures?
What exactly is a file descriptor and what system calls can we do with one?
How do we get the inode information for a file?
How would you use system calls in C to accomplish the following tasks:
Check if a file is a regular file, directory, or symlink?
Check if a file is a readable, writable, or executable?
Check the size of the file?
Check the last modification time?
What is a process?
What attributes or components does it have?
What system calls can you do with them?
What happens during the life cycle of a typical process?
How do we prevent a fork bomb?
How do we prevent zombies?
Why would we want to prevent these situations?
What is a signal?
What is networking?
What is an IP address and what is a domain name?
What is a network port?
What is a URL and what are its components?
What is HTTP?
What system calls does a typical HTTP client perform? What messages does it send and receive?
What system calls does a typical HTTP server perform? What messages does it send and receive?
How would you modify echo_client_refactored.c to implement a port scanner?