MidTerm Exam Topics
Unix Core Philosophy
Inode
Links (hard and symbolic)
Here Documents
Pipes and Filters:
Fundamental use of core utilities such as cat, wc, tail, head, sort, etc.
Shell Quoting
Command Substitution (backtics)
Regular Expression Sytax and usage with grep/egrep, awk (YOU MUST KNOW REGULAR EXPRESSIONS)
Regular Expression metacharacters
Friedl’s two rules of Regular Expressions
awk (YOU MUST KNOW AWK)
Compilation Process and flags:
-save-temps
-shared
-g
-Wall
-c
-S
-Wa,-ahl
-l
-L
Benefits of shared libraries
steps in building shared libraries
Basic concepts of make:
Macros
Targets
Dependency lists
Rules
"THE TAB"
Debugging:
__DATE__, __TIME__, __LINE__ macros
breakpoint (b) command
delete (d) breakpoint command
backtrace (purpose)
print (p)
Processes
Multiuser and Multiprocessing OS
Concurrency vs. Parallelism
user vs. kernel mode
System Call procedure
What is a process?
fork() and exec() in detail (how do you create a new process, how do
you
run a new program in the same process?)
ELF Format (simplified)
C Language mappings to ELF segments
Basic concepts and differences of fork and exec and system
Pipes:
Basics of pipes and filters
Difference between named and unnamed pipes
Signal Processing
What is a signal?
6 Reasons why one might use signals
Basic (Version 7) signal handling (signal(), kill(), psignal())
Alarms (SIGALRM)
EXAMPLE QUESTIONS:
WRITTEN PORTION (Approximately 40 questions, allow 1 hour):
Explain in full the meaning of the following regex ... (short answer)
What is wrong with the following here document? (choose 1 of 5 choices)
What is the output of the following command ... (short answer)
Which command would [sort, uniquely list, etc.] the above data by [some condition]? (choose 1 of 5 choices)
Given the following regex ... on the following text ..., which of the following would be the output? (choose 1 of 5 choices)
LIVE PORTION (Approximately 2-3 questions, allow 2 hours):
Of the last 400 words in the file
/usr/ucblib/dict/words
(there’s one word per line), how many of those words [match
some
verbal pattern which you need to translate into a regex]
I want you to create a list of the
users
(by username) who are logged into the system, where the usernames are
the
only output, and they are only listed one time in the output.
What is the total bytes of all files in the ... directory?
Write a short C program that handles the signal ...
Of the following data, what is the average rainfall for the state of MN
over the last 30 years? Use AWK to render your solution.
Write a simple C program that sends a message over a named pipe to
another
process.