Hardware Transactional Memory
9 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

When using transactional memory in a parallel program, which of the ACID properties (associated with database transactions) must be satisfied? Select all correct answers.

  • Atomicity (correct)
  • Consistency
  • Isolation (correct)
  • Durability

In a parallel program using transactional memory, what happens when two transactions attempt to write to the same memory location?

  • The write that is completed first wins, and the second write is ignored.
  • The program crashes.
  • Nothing. This can never happen because the transactional memory mechanism prevents it.
  • One or both transactions abort, rollback, and restart execution at the beginning of the transaction. (correct)
  • One transaction waits until the other commits, and then retries the write.

In a parallel program, a transaction can be used to replace what type(s) of synchronization? Select all correct answers.

  • fetch-and-add instruction (correct)
  • mutual exclusion lock (correct)
  • barrier
  • post/wait synchronization

Suppose we are using transactional memory to parallelize accesses to a linked list. We choose a coarse-grained transactional approach, in which we mark all Insert and Delete operations as atomic. The third operation is Search, which returns true/false based on whether a particular value is found in the list. If we do not mark the Search operation as atomic, what could happen?

Select all correct answers.

<p>We may return true for a value that has been deleted from the list by another thread during the search. (A), We may return false for a value that has been inserted into the list by another thread during the search. (D)</p> Signup and view all the answers

When using hardware transactional memory, which mechanism is used to detect a conflict?

<p>The cache coherence protocol. (D)</p> Signup and view all the answers

When using hardware transactional memory, the value written to a memory location by an uncommitted transaction is speculative, and it must be temporarily stored before becoming visible to the rest of the processors.

Where are possible locations in which the speculative state can be stored? Select all correct answers.

<p>last-level cache (A), memory (B), store buffer (C), L1 cache (D)</p> Signup and view all the answers

In transactional memory, which of the following conditions represents a conflict? Select all correct answers.

<p>One transaction reads a memory location that is written by a concurrent transaction. (A), Two concurrent transactions write to the same memory location. (B)</p> Signup and view all the answers

Explain Speculative Lock Elision

<p>Speculative Lock Elision: Concurrent accesses to a shared data structure might not conflict, and lock/unlock is not, in fact needed. Example: we do some sort of read, then check a variable, where the write is conditional. In this instance, it may not be necessary to lock the entire data structure: Stores to acquire a lock, and release a lock, as a pair have no effect. This is known as a silent store pair. The resulting value of the store is the same as if the stores weren’t even there. This way, we can not acquire the lock, and just do the critical section, and see if it worked.</p> Signup and view all the answers

Explain Transactional Lock Removal

<p>Like SLE, but does conflict removal by calculating a timestamp and letting the lower timestamp have priority in case of conflict.</p> Signup and view all the answers

Flashcards

Capital of France (example flashcard)

Paris

More Like This

Principles of Information Systems Quiz
10 questions
GEIT210 Chapter 1: Hardware
13 questions
Hardware-Komponenten des Computers
45 questions
Use Quizgecko on...
Browser
Browser