Questions 100% Well Answered.
Hardware could be utilized to solve the critical section problem, three forms of hardware
solutions include: - Answer 1. Memory Barriers
2. Hardware Instructions
3. Atomic variables
Hardware based solutions to the critical section problem are complicated as well as - Answer
generally inaccessible to application programmers
Mutex Lock - Answer A process must acquire the lock before entering a critical section; it them
releases the lock when it exits the critical section
aquire() - Answer aquires the lock
release() - Answer releases the lock
Only if a lock is available - Answer a call to acquire() succeeds
A process that attempts to acquire a unavailable lock - Answer is blocked until the lock is
released
Spinlocks are nice because - Answer we dont need to do a context switch when a process must
wait on a lock, we can just spin until the lock becomes available
A semaphore S is an integer variable that, apart from initialization, is accessed - Answer only
through two indivisible (atomic) operations: wait() and signal()
Two types of semaphores - Answer Binary Semaphore (similar to mutex lock) - int range from
0 to 1
Counting semaphore - int 0 to N