CS 140 Midterm: CS 140cs140 midterm winter 1999 solutions

21 views8 pages
31 Jan 2019
Course
Professor

Document Summary

Please initial the bottom left corner of each page. You have 50 minutes to answer as many questions as possible. The number in parenthesis at the beginning of each question indicates the number of points given to the question, and about how many minutes you should spend on your answer. Write all of your answers directly on the paper. In accordance with both the letter and the spirit of the honor code, i did not cheat on this exam. True/false questions (14 points total) (2 points for correct answer, 0 for blank, -1 for incorrect) (note: because of ambiguities, everyone gets full credit for questions 3, 6, 7) If monitor code has a circular dependency, it can deadlock. For example, for the circular buffer code we looked at in class, if a thread performing a get busy waited when it encountered an empty buffer (rather than blocking), no put thread could ever enter the monitor, causing deadlock.