Question 18 / 18: 

4. [8 points]: Louis writes a multithreaded program, which produces an incorrect answer some of the time, but always completes. He suspects a race condition.

Which of the following are strategies that can reduce or eliminate race conditions in Louis’s program?

Ensure that all locks are acquired in the same order.
A  True
B  False
<< First < Previous Flashcard Next > Last >>
Explanation:

FALSE. Always acquiring locks in the same order will prevent deadlocks. While deadlocks are arguably a form of race condition, there was no deadlock here since Louis’s program always completes.

Exam Home Page
https://www.jobilize.com/computer-system-engineering-exam-by-prof-robert-morris-mit

Computer System Engineering 6.033 Spring 2009

Author:

Access: Public Instant Grading

Attribution:  Morris, Robert, and Samuel Madden. 6.033 Computer System Engineering, Spring 2009. (MIT OpenCourseWare: Massachusetts Institute of Technology), http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-033-computer-system-engineering-spring-2009 (Accessed 2 May, 2014). License: Creative Commons BY-NC-SA
Ask
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/computer-system-engineering-exam-by-prof-robert-morris-mit" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>