Week 11

Quiz
•
Computers
•
University
•
Hard

Hansjörg Schraubenzieher
Used 9+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Consider this Reader/Writer Lock implementation. Select all that hold.
Prioritizes readers.
Prioritizes writers.
Would also work when replacing notifyAll() with notify().
2.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
Fill in the blank for the while(......) condition in acquire_read(), s.t:
- the lock works correctly
- AS FAIR AS POSSIBLE (given the available variables)
- it's not completely inefficient
writers>0 || readers>0
writers>0 || writersWaiting>0
writers>0 || (writersWaiting>0 && writersWait<=0)
writers>0 || (writersWaiting>0 && writersWait>0)
writers>0 || writersWait<=0
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Fill in the blank for the while(.....) condition in acquire_write() method, s.t:
- the lock works correctly
- lock is AS FAIR AS POSSIBLE (given available variables)
writers>0 || readers>0
writers>0 || writersWait>0
writers>0 || readers>0 || readersWaiting>0
writers>0 || readers>0 || writersWait>0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Implementing the methods this way corresponds to:
optimistic locking
fine-grained locking
lazy locking
coarse-grained locking
5.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
This is the add() method of a concurrent linked list. What holds (multiple can be correct) given multiple threads can access add() concurrently?
No bad interleavings possible.
Bad interleavings possible.
Implementation uses fine-grained locking
Implementation uses coarse-grained locking.
6.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
This is the add() method of a concurrent linked list. What holds (multiple can be correct)?
No bad interleavings possible (correct implementation).
Bad interleavings possible (incorrect implementation).
Uses hand-over-hand locking.
Uses optimistic locking.
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Fine-grained Locking (using hand-
over-hand locking) on a linked list re-
quires us to validate if a node is still
reachable before deleting it.
True
False
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
C programming-1

Quiz
•
University
10 questions
Cybersecurity Ethics

Quiz
•
10th Grade - University
10 questions
C - Pointers

Quiz
•
University
15 questions
MultiThreading Quiz

Quiz
•
University
10 questions
Komposter

Quiz
•
University
10 questions
DBMS - Concurrency Control

Quiz
•
University
15 questions
Distributed Database Handling Quiz 1

Quiz
•
University
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops

Quiz
•
9th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade