Midterm Exam Information
Written by Chris Gregg and Nick Troccoli, based on documents by Jerry Cain, Julie Zelenski, Marty Stepp and others
Date/Time:
Friday, February 14th, 1:30PM-2:50PM (in class)
Locations:
Last Names A-S: NVIDIA Auditorium
Last Names T-Z: Cubberley Auditorium
Review Session:
Monday, February 10, 7-8:30PM in Hewlett 201
If you do not have a workable laptop for the exam, you must let us know by Monday 2/10 @ 11:59PM PST. Limited charging outlets will be available during the exam.
Answers
Midterm Questions
Midterm Blank Answers
Midterm Solutions
You can find code for testing your answers by making a personal copy of /afs/ir/class/cs110/samples/midterm
.
Scores and Graded Exams
How do I find out my score? The scores have been released on Gradescope, a website for grading course materials. If you did not receive an invitation to join Gradescope (please check your spam folder!) please contact the course staff. Log in to Gradescope to see your midterm score.
If you have questions about exactly what points you missed and why, please look over the grade and markings made by the grader, compare it with our answer key and test project, and then stop by office hours or send the instructors an email if you still have any questions.
The statistics of the exam scores (out of 80) were as follows:
First Quartile: 36 / 80
Second Quartile (Median): 49 / 80
Third Quartile: 61 / 80
Mean: 48 / 80
Standard Deviation: 16.4 / 80
Regrade Policy
We work hard to grade consistently and correctly, but sometimes we make mistakes in grading. If you believe part of your exam was incorrectly graded, please first copy the solution project in /afs/ir/class/cs110/samples/midterm
and run your answer. Fix whatever you need to fix to get it to run correctly. This is the easiest way to test your code. If, after running your code, you still believe your grade is incorrect based on your original answer, submit a regrade request online via Gradescope (first view the question in your exam, and submit a regrade for that question on that page). Regrade requests need to point out the aspect of the problem that was correct, but for which points were taken off. We use a detailed rubric to grade exams, so you must clearly articulate how the specified rubric was misapplied when grading your answer. You must also submit test program output for the given problem (if applicable), and a copy of your code (if needed, with any minor syntax errors corrected), and any other necessary code/content so that we can run and evaluate your code.
Regrade requests will be accepted starting on Thurs. 2/20 at 3PM.
You must provide all the required information listed above and in the regrade request form in order for us to review your regrade request. Also, we reserve the right to re-grade the whole exam to make sure there are no other grading issues present - this may result in a lower total score.
All midterm regrade requests must be submitted within 7 days of the date when regrade requests were opened - by 3PM PST on Thursday, February 27, 2020.
Overview
The midterm exam will be held during the full class period on Friday, February 14th, 1:30PM-2:50PM.
The exams are designed to assess your mastery of the course learning objectives, with a particular emphasis on material that was prominent in the lectures, assignments and sections.
The exam is closed-book. You may bring a double-sided US-Letter-sized (8.5"x11") page of your own prepared notes. We 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 proctor during the exam if you want to use a core C function or C++ class we didn’t provide.
You will take your exam electronically, using our custom BlueBook exam software, which you can run on your computer if you have one. If you do not have access to a laptop for the exam that can run BlueBook, please contact the course staff. You cannot access notes, run other applications, use the Internet, nor use any other electronic devices during the exam.
Material Covered
The midterm is intended to assess your understanding of the content covered in the first half of the course. The coverage is through week 5, plus assign4, but not beyond (i.e. midterm will not cover more advanced thread topics). The priority is on material that figured prominently in the assignments, sections, lecture, and reading (this list is in order of decreasing emphasis).
We highly recommend revisiting the sections and assignments as you prepare. The textbooks also contain many exercises if you want additional problems to work.
We'd love to see the Piazza forum come alive in helping everyone do their best on the exam – this is a great place to ask and answer unresolved questions, discuss conceptual issues, share techniques and materials you are finding useful as preparation, and support and encourage each other.
Topics Summary
Check your rear-view mirror for the very impressive list of things you've learned in 110 so far!
- 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 understand the UNIX v6 file system concepts, data structures, and layers you coded against for Assignment 2.
- You should be familiar with
fork
,waitpid
, all of the various status macros,execvp
,signal
, signal handlers, signal blocking and unblocking,kill
,raise
, process ids and process groups,pipe
,pipe2
, 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 the OS scheduler works (as covered in lab 3).
- You should understand your implementations of
pipeline
,subprocess
,farm
, andtrace
, from Assignment 3. - You should understand your implementation of
stsh
and how a shell manages and executes jobs, from Assignment 4 - You should have a basic understanding of threads in C++, including the differences between threads and processes and how to manage concurrency issues with threads
- You should understand all of the material in the lab handouts (although we will not test you on anything regarding tools —i.e.
g++-5
,gdb
,valgrind
,info
, the/sys/proc
pseudo filesystem, etc. will not come up).
What To Bring
The exam is on your computer. You should bring:
- Your laptop and charger
- The device you use for two-step authentication (to submit the exam)
- your double-sided page of notes
- A power strip/extension cord (optional, but recommended if you have access to one)
Logistics
-
The Honor Code: the exam is to be completed individually and without any assistance from a partner or other students. Follow the Stanford Honor Code (see link on main course homepage) during the exam: submit only your own work, do not use unpermitted aids on the exam (see below for permitted aids), and say something to the instructors or students in question to prevent any inappropriate activity conducted by others surrounding the exam.
-
Permitted Materials: During the exam, you may use/reference:
-
a double-sided US-Letter-sized (8.5"x11") page of your own prepared notes
-
any function or class references included in the exam problems themselves
You are not permitted to use any other materials, such as printouts (notes, slides, code, practice exams, etc.), other textbooks, or electronic devices (iPads, Kindles, calculators, music players, etc.).
-
-
Grading: For coding questions, the majority of the points are typically focused on the correctness of the code. However, there may be deductions for code that is roundabout/awkward/inefficient when more appropriate alternatives exist. We will reward the simple, direct approach for its good design decisions and such code will likely have fewer correctness issues, so the choice of appropriate design can have a large impact. For example, we expect you to leverage appropriate features from the standard libraries; re-implementing that functionality wastes your valuable time and introduces opportunity for error.
Note that certain problems may have certain constraints (such as only using certain material, etc.) that you must follow to earn full credit. We reserve the right to deduct points for extremely inelegant or inefficient code that dodges the spirit of the problem.
You are not required to write
#include
statements on the exam. Please do not abbreviate any code on the exam (such as writing "x2" next to code to copy it twice). Abbreviated code will not be graded.Pseudo-code (writing English sentences and phrases instead of code) will typically earn little to no points. For example, writing "In this part of the code, I want to open the file and read each line and print it" will not earn any points.
You should include your answer, as well as any scratchwork, in the text area for each problem. An answer to a problem not in the designated answer pages for that problem will not receive any credit.
Unless otherwise specified, it is fine to write helper functions to implement the required behavior.
Downloads
BlueBook Software (version 1.1.0):
Mac Download | Windows Download | Linux Download
IMPORTANT: If you have taken a course that used BlueBook in the past two quarters, you should not have to re-download the software. When you open up BlueBook, you should see a version number of 1.1.0 at the bottom. Once you have downloaded the installer file, install BlueBook wherever you wish on your computer. If you're using a Mac and you get an error saying that the Disk Image is from an unidentified developer, open up the installer file in your finder, and right click it and select "Open." The same window will pop up, but this time you'll have a chance to open it anyway. If you get any popups asking for keystroke or other permissions, please make sure to grant them in order for the exam to administer properly. On Windows, if you get a message that says, "Windows protected your PC," you can click on "More info" and then "Run anyway."
Exam Reference Sheet:
Practice Materials:
Below is a collection of problems across five sample midterms that represent the type we might give. Understand that we are trying to give you a sense of what some CS110 midterm problems have looked like in the past, but we may not replicate the structure of these practice midterms in the actual exam. In particular, some of the material on past exams is different from the material from this quarter. Also note that some of the problems from the practice exams have been cannibalized to contribute to the section handouts. You should be able to answer any of those questions again should they come up on the exam.
BlueBook Practice Midterm: BlueBook | Solutions
Password: coyote
This was the midterm from CS110 Spring 2019. It was written as a 120 minute BlueBook exam (40 minutes more than this quarter).
Note: the practice BlueBook exam is configured with an infinite time limit. You cannot close BlueBook and come back to work on the exam later - you must complete it in one sitting. You cannot submit practice exams - if you'd like to check your answers, leave BlueBook open while you do so. Note that for security reasons, BlueBook disables copy/pasting into or out of BlueBook. You can copy/paste within BlueBook, however.
Practice Midterm 1: PDF | Solutions
Practice Midterm 2: PDF | Solutions
Practice Midterm 3: PDF | Solutions
Practice Midterm 4: PDF | Solutions
Review Session Materials: PDF
Video on Canvas (under "Course Videos" tab)
BlueBook
Based on a handout by Brahm Capoor
BlueBook is a program that can administer electronic exams distributed in a special file format. BlueBook itself does not come with any exams but is rather just an application used to take exams. Your exams, including practice exams, will be distributed as special BlueBook files uploaded to the course website. These exam files are encrypted and cannot be opened without a password, which will be provided to you at the start of the exam, or along with the practice materials. Download these files and keep them wherever you wish on your computer.
Once you have BlueBook installed and an exam downloaded, begin by opening BlueBook. On a Mac, if you get a message saying that you were blocked from opening the app for security reasons, browse to the app in the Finder, right click it and select "Open." The same window will pop up, but this time you'll have a chance to open it anyway. The app should go full screen and allow you to choose the exam file you downloaded earlier. Click the folder icon on the right of the screen and navigate to the exam file and click ‘ok’, followed by ‘Load Exam’. At this point, you’ll be brought to the Exam Start Screen. Fill out your details on this screen, fill in the password and click ‘Start Exam’.
You’ll then be brought to the main Exam View, which allows you to go back and forth between all the questions for the duration of the exam. You can navigate between questions using the toolbar at the top of the window. The text editor provided to you will have syntax highlighting, bracket completion and automatic indenting, but will not allow you to compile your code. The exam will end automatically after the specified duration ends.
We know that BlueBook is not the same as working with a compiler as you do on Myth, and we account for that in how we design and grade the exam. We are assessing your ability to think logically and use appropriate problem-solving techniques. We expect you to express yourself in reasonably correct C, but we will be lenient with errors that are syntactic rather than conceptual.
When you are done with your exam – or time has run out – you can begin the submission process for the exam. Do so by clicking the blue ‘Submit’ button in the toolbar. Once time runs out, this process automatically starts. Beginning submission is an irreversible decision, so make sure that you’re confident you’re ready to turn your answers in. Once you confirm that you want to submit, the BlueBook window will shrink and allow you to turn on your internet in order to submit the exam. Importantly, we verify your identity while submitting, so please make sure to have your two-step authentication device with you. Once your submission is successful, you will see a message with a green check mark and a confirmation code of your exam submission, which you should keep for your records in case any issues arise later. At this point, feel free to close BlueBook. Congratulations! You’re done with the exam!
Some final notes about BlueBook:
- Please make sure that your laptop has at least a few gigabytes of free space before the exam begins. While BlueBook exams certainly don’t take up that much space, we do back up your answers in case your computer crashes and we want to make sure your computer has enough space for these backups.
- Please come to the exam with a fully charged laptop. While there will be some facilities to charge your laptops during the exam, there will likely not be enough for everyone.
- BlueBook is capable of detecting if you switch away from the window during the examination. In order to avoid this signal being triggered accidentally, please disable your internet connection and/or notifications before the exam begins. You will have the opportunity to turn them back on when the time comes to submit.
- Should your laptop crash during the exam, please see a proctor as soon as possible so they can restore your answers and you can continue working. Do not attempt to restart the exam from scratch as this might overwrite your previous answers.
Icons by Piotr Kwiatkowski