Tutorial: Locks Flashcards
lock_acquire can be just referred to as _____
lock
lock_release can be just referred to as _______
unlock
lock_acquire allows the caller to _______ _______ in the CS
exclusively, execute
lock_release ____ the caller from the CS, allowing another lock requester to execute in the CS
exits
In the Lock API Pthread Locks, what is the lock type called?
pthread_mutex_t
In the Lock API Pthread Locks, what is the acquire function signature?
pthread_mutex_lock(pthread_mutex_t* lock)
In the Lock API Pthread Locks, what is the release function signature??
pthread_mutex_unlock(pthread_mutex_t* lock)
_______ ____ always succeeds, while _____ ____ _____ may fail
atomic, swap, compare, and, swap
______ ____ ______ is a more powerful primitive at it allows condition checking before executing.
compare, and, swap
Compare and swap is more useful when building ____-____ data structures
lock free
Both atomic swap and compare and swap only work on single ______ words
8-byte