Stanford University
Computer Science 249B: Winter 2008 - 2009: Answers
You should complete the exam yourself without assistance from others. It is a violation of the honor code to receive assistance from others or to copy material without proper attribution.
Feel free to use point form. Each question can be answered satisfactorily in a page of writing or less. I am primarily interested in the most key points responsive to each question. Each question is weighted equally.
Class the formatting and wording of question 4 is slightly different than was on the exam. See the cs249bmidterm09 for the exact wording of the questions.
Answer:
Grading: Full credit for each part if the reason was very close to the above. Partial credit was given to other good reasons.
Answer:
A specific bug was required (4 points). Then the reason why it would not be caught by functional and audits were 3 points each.
We gave 4 points for the first reason and 3 for the next two reasons. Full credit required discussing both asserts and just-return. Additionally we required at least one negative and one positive. Multiple other reasons were accepted for asserts.
We gave 4 points for the first reason and 3 for next 2 reasons. Reasons were the three listed above (exceed stack, heap means many copies / CC failing, and predictable memory).
We gave 4 points for the first reason and 3 for next 2 reasons. Reasons were the ones listed above. We required some mention of the fixed-size block or hierarchical structure such as a directory. The term database alone did not suffice.
Answer: Each separate module runs as a separate process in the cluster, with some replicated per input, e.g. a video monitoring process per camera. There is also a system database process (with backup process) maintaining the quasi-persistent state of the system. Input from the video cameras may be wired directly to each video monitoring process, to minimize internal system communication cost. The video processing per camera can be separated into two or more modules that run in parallel, either in same process or separate - the former to minimize com. overhead. Similarly, card reader processes update the system database with personnel entries and attempted entries - low bandwidth updates. Separate tracking processes match entries with objects identified by video with those corresponding to entries. Separate diagnosis processes match profiles with personnel in the building, indicating alarm conditions to the system database on detecting anomalies. Thus, the system can scale with cameras, cardreaders and personnel by adding corresponding processes, yet achieves fault-tolerance using a system database, allowing fast restart. The video processing process is the only one with local parallelism, given the cycles required and the bandwidth between low-level and high-level video processing.
4 points were specifically awarded for discussing the camera processes, card reader processes, system database, tracking/alarm/logging, and fast restart/fault tolerance as above. If any of these were missing, additional points were awarded for extra detail in a different sections. Other full credit answers than the one above included a discussion of the agent structure.
We gave 4 points for the first reason and 3 for next 2 reasons. Reasons were the ones listed above.
We gave 4 points for the first reason and 3 for next 2 reasons. Reasons were the ones listed above (cannot lock during iteration, too expensive to make a copy, throwing an exception is excessive, and many iterations are not time sensitive).