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
15 questions
JavaScript Basics

Quiz
•
12th Grade - University
13 questions
Intro to IF statements

Quiz
•
KG - University
10 questions
Excel If function WSC 4.2.3

Quiz
•
7th Grade - University
10 questions
Kiểm tra 15 phút Tin học 10 - DA - Bài 26,27,28

Quiz
•
10th Grade - University
10 questions
321 - Quiz07

Quiz
•
University
16 questions
HTML Tags

Quiz
•
University
16 questions
PSC ALM QUIZ

Quiz
•
University
10 questions
CSI104_Introduction

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University