Here is a general outline of the key concepts and commands (arranged by topic) that you should know for Exam 03.
The exam will have the following format:
Identification: Identify commands, Python function, or system calls that perform certain tasks.
Short Answers: Briefly answer conceptual questions about document tools, Python, and system calls.
Debugging: Fix some Python scripts that use system calls.
Programming: Write some Python scripts that use system calls.
How would you use awk to:
What are the advantages and disadvantages of using command line tools such as pdflatex and gnuplot to create documents?
Given a TSV data file, how would you use gnuplot to produce a line graph in PNG format?
How would you use ImageMagick to:
How is Python different from the Bourne shell? How is it similar?
How do we manage control flow in Python? How do we utilize these constructs?
What data structures do we have in Python? What are their basic operations?
How do we process command-line arguments in Python?
sys.argv
getopt
What is the difference between user mode and kernel mode? How and when do we transition between the two?
What exactly are system calls? What happens when an application performs one?
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? Using the inode information, how do we
Check if a file is a regular file, directory, or symlink?
Check the size of the file?
Check the last modification time?
Describe how find determines if a file, directory, or symlink is empty.
Describe different reasons why os.stat could fail on a file.
Given the command ./script.py *.txt
, who is responsible for expanding
the *.txt
into all the files that match that pattern?
How would you print all the files found underneath a directory and all its subdirectories?
What is a process? What attributes does it have and what system calls can you do with them?
Describe the following components of a process.
Describe why a process is viewed as a unit of allocation by explaining the life cycle of a typical process.
How do we prevent a fork bomb? zombies? Why would we want to prevent these situations?
What is a signal? What does a signal do to a process? How do applications handle signal events?
How do we send a signal to another process?
How do we catch signals and handle them?
What happens to system calls if a signal interrupts them?