• Card 20 / 22: 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

    Answer:
    B) False

  • Keyboard Shortcuts

    Previous Card ← Previous Card Button
    Next Card → Next Card Button
    Flip Card Space-Bar
<< First < Previous Next > Last >>

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now
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.

Hide Choices Interactive Question 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
Flash Cards plugin by Curtis Blackwell github.com/curtisblackwell/flash_cards
Google Play and the Google Play logo are trademarks of Google Inc.
Ask
Miranda Reising
Start Quiz
Donyea Sweets
Start Test
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>