Week 11

Week 11

University

12 Qs

quiz-placeholder

Similar activities

DSA quiz 3 set 1

DSA quiz 3 set 1

University

10 Qs

Introducción Redes Tele1 IB

Introducción Redes Tele1 IB

10th Grade - University

15 Qs

Binary Tree

Binary Tree

University

14 Qs

Lab z sieci -1

Lab z sieci -1

University

14 Qs

Python Quiz

Python Quiz

University

15 Qs

Информация, свойства информации. Единицы измерения информаци

Информация, свойства информации. Единицы измерения информаци

University

16 Qs

Computer Hardware - CPU & GPU

Computer Hardware - CPU & GPU

7th Grade - University

16 Qs

Hexadecimal - decimal y binario

Hexadecimal - decimal y binario

University

17 Qs

Week 11

Week 11

Assessment

Quiz

Computers

University

Hard

Created by

Hansjörg Schraubenzieher

Used 9+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

12 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

2 mins • 1 pt

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Media Image

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

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?