Computers

University

Image

Week 14

14
plays

9 questions

Show Answers
See Preview
  • 1. Multiple Choice
    1 minute
    1 pt

    Mark one ADVANTAGE and one DISADVANTAGE of STM (Software Transactional Memory, as opposed to Hardware Transactional Memory)

    worse performance

    better performance

    can be used flexibly, without support from the hardware

    more work for the programmer

  • 2. Multiple Choice
    2 minutes
    1 pt

    What does the programmer have to pay attention to when using shared mutable state with reference-based STMs (e.g. scala-stm)?

    variables must be volatile

    special reference variables/objects must be used for the shared state

    the program should not directly modify the shared state by itself

    the programmer must remember to add accesses to the read/write set

    when using `retry`, one must specify all variables for which updates should be detected

  • 3. Multiple Choice
    30 seconds
    1 pt

    Atomic registers can be used to implement CAS

    True

    False

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?