Practice Finals
Your final exam will be Friday, August 17, from 7pm-10pm, in Skilling Auditorium.
The exam is closed book, closed note, closed electronic device. I will provide you with all of the C function prototypes and C++ classes that might be relevant to a particular problem, and you can always ask a CS110 staff member during the exam if you want to use a core C function or C++ class that we didn’t provide. Caveat: You are permitted to populate both sides of TWO 8.5” x 11” sheets of paper with as much material as you can cram into them.
The exam will primarily focus on multithreading and networking, although all lecture material is fair game. (You won’t be asked to write any code using nonblocking I/O.)
Details for SCPD and registered remote students
If you are not an SCPD student but still want to take the exam remotely, make sure I know about it ASAP. I’ll be sending emails to everyone individually within the next few days to confirm your exam arrangements.
You can take the exam on the day it’s given (August 17) or the day before (August 16) if that works better for your schedule. If this time window doesn’t work for you, email me ASAP and we can arrange something.
Material
Here’s the impressive list of topics you should be familiar with:
- You should understand the UNIX v6 file system concepts, data structures, and layers you coded against for Assignment 1.
- You should be familiar with the basic concepts of layering and naming in computer systems.
- You should understand how
open
,read
,write
,close
,dup
,dup2
,stat
, andlstat
all work. - You should understand file descriptor tables, the file entry table, the vnode table, and what type of information is stored in each.
- You should be familiar with process ids,
fork
,waitpid
, all of the various waitpid status macros,execvp
,signal
, signal handlers, signal blocking and unblocking,sigsuspend
,kill
,pipe
, and pipes. - You should be familiar with the various concurrency issues that can come up as a result of a single code base controlling multiple processes.
- You should have a basic understanding of how virtual-to-physical memory mapping works and how it’s used to allow all processes to operate under the illusion that each owns its full virtual address space.
- You should have a basic understanding of how the OS scheduler works (with an understanding of what the ready queue and blocked set are).
- You should understand your implementations of
pipeline
,subprocess
, andfarm
from Assignment 2. - You should understand what race conditions and critical regions are and how to identify them.
- You should understand the C++
thread
class, how to instantiate one, and how to use itsjoin
method. - You should be familiar with the
mutex
,condition_variable_any
, andlock_guard
classes. - You should understand the notion of a semaphore and how we implement it in
terms of
mutex
es andcondition_variable_any
s - You should understand how to effectively use
mutex
es andsemaphore
s to protect against race conditions, protect against senseless busy waiting, protect against deadlock, and minimize the amount of processor time wasted by athread
unable to do any meaningful work. - You should understand all of the various thread synchronization patterns discussed in lecture.
- You should understand the client-server model as discussed in lecture.
- You should be familiar with the
sock_addr
family of socket address structs (which will be provided where needed on the exam). - You should know all of the socket API calls we’ve used during our study of
networking:
socket
,bind
,connect
,listen
,accept
, and what each of them does. - You should be familiar with all of the examples presented in lecture and in
/usr/class/cs110/lecture-examples/spring-2018/networking
. - You should be familiar with the basic structure of an HTTP request and how
they were manipulated by your
proxy
solution. - You should have a basic understanding of nonblocking I/O and be able to speak of its benefits and shortcomings when compared to multithreading and multiprocessing approaches to I/O. You should have a basic understanding of level triggering vs edge triggering and how nonblocking code works.
- You should be familiar with the MapReduce programming model and your own
mr
/mrm
/mrr
implementation of it. - You should be able to address questions pertaining to the material presented during the Principles of System Design lecture.
- You should be familiar with basic ideas from our 3 guest talks. You don’t need to understand all the details, but you should understand how they relate to material we talked about earlier this quarter. I’ll be fair and not ask anything too hard :)
Since lab was optional this quarter, I won’t test you on any material that only appeared in lab. However, it’s a good idea to review material in the lab handouts. Many of those questions were previous exam questions, and I should be able to ask you similar questions.
I will explicitly not test you on anything regarding tools. You don’t need to
know how to use gdb
, valgrind
, g++
, etc.
Practice Finals
These finals are actual exams that were given in previous quarters. Understand that I’m under no obligation to replicate the structure of these practice finals while writing yours, as I’m only trying to give you a sense of what some CS110 final problems have looked like in the past.
I highly recommend struggling with each exam before looking at the answers. Even if you stare at a problem and don’t know the answer, it’s better to spend some time with it first and possibly look through your notes before looking at the answer key. This class isn’t about memorizing answers; it’s about figuring out how to derive those answers when no answer is immediately apparent.
Good luck with studying! Try not to stress too hard, and let us know if we can help! Enjoy the rest of your summer :)