Answer:
for 1 its A or D i think most likely A for 2 its B or C I think most likely C for 3 its C I think 4 is D for 5 Is B i think.
The correct sequence of calls to a reader-writer lock rwlock to protect this critical section involving a shared variable counter: counter- rwlock.lock_write();
counter++;
rwlock.unlock() is the correct sequence of calls to a reader-writer lock rwlock to protect this critical section involving a shared variable counter
- This is happening for the reason that lock. With the aid of the rwWriteLock, the vital section must be protected by unlock(). It guarantees that the ReadWriteLock will lock the program's other threads.
- One of the readers-writer difficulties is solved by a readers-writer lock, also known as a single-writer lock, multi-reader lock, push lock, or MRSW lock.
- This means that while several threads can read data concurrently, publishing or changing data requires an exclusive lock.
- Controlling access to a memory data structure that cannot be updated atomically and is invalid (and should not be accessed by another thread) until the update is finished may be a typical purpose.
To learn more about multi-reader lock visit:
brainly.com/question/15698405
#SPJ4