CS350 Midterm: S13-midterm.pdf

58 views14 pages
8 Oct 2014
Course
Professor

Document Summary

Student #: __ __ __ __ __ __ __ __ #include statements or semi-colons: if you need more space, use the last page, and indicate that you have done so in the original question, a big gap after a question does not necessarily mean. Bonus that a long answer is expected: did you see in the marking guide there"s a bonus question? woo-hoo! Make sure you answer it at the end: relax! Question 1 [13 * 1 = 12 marks] (a) explain why registers k(cid:882) & k(cid:883) cannot be used (cid:523)even temporarily(cid:524) by gcc in. Os/(cid:883)(cid:888)(cid:883). (b) explain why there are more registers stored in a trap frame than in a thread context. (c) true or false: )f there are no global variables, then no locks are necessary. Briefly justify your answer. (d) give one advantage and one disadvantage of having a software design with high lock granularity (cid:523)many locks(cid:524).