Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Imposter

Total questions: 13

Worksheet time: 11mins

Name
Class
Date
1.

Mark all criterias that a valid consensus protocol fulfills

a)

Lock-freedom

b)

Consistency

c)

Wait-freedom

d)

Starvation-freedom

e)

Validity

2.

Can transactions in STM induce deadlocks?

a)

Yes

b)

No

c)

Maybe

3.

Which of the following are advantages Hardware TM has over Software TM

a)

It is faster

b)

Better flexibility

c)

Unbounded resources

d)

Has lower power consumption

e)

Can handle large transactions

4.

Which of the following are correct consensus implementations (for N threads)

a)

a)

b)

b)

c)

c)

d)

d)

5.

Which of the following statements are true?

a)

Wait-freedom implies Lock-freedom

b)

Lock-freedom implies Starvation-freedom

c)

Freedom from starvation means that if some processes are trying to enter a critical section then one of them must eventually succeed

d)

The ABA problem does not occur if concurrent data structures are im-

plemented in a lock-free manner

6.

Mark all correct statements.

The following code is...

a)

wait-free

b)

starvation-free

c)

lock-free

d)

deadlock-free

e)

livelock-free

7.

Mark the correct statements:

The following code is...

a)

wait-free

b)

starvation-free

c)

lock-free

d)

deadlock-free

8.

What is the length of the critical path?

a)

90

b)

120

c)

75

d)

180

9.

What is the minimum number of processors for the best runtime?

a)

2

b)

3

c)

4

d)

5

10.

Which of the following are true?

a)

The Filter Lock is fair

b)

The Filter Lock is based on using multiple instances of the Peterson lock

c)

The Peterson Lock is based on using multiple instances of the Peterson lock

d)

The Peterson Lock suffers from starvation

11.
Considering Amdahl's law, what limits the maximal possible speedup ?
a)
The sequential parts of the program
b)
It states that there is no limit
c)
The maximum number of processors in a machine
d)
The energy consumption of a machine
12.
Happens-before order is...
a)
the intersection of program order & volatile variables
b)
a synonym for program order
c)
the union of synchronization order & program order
d)
the transitive closure of synchronization order & program order
13.
Which of these combinations can never be true for any history?
a)
linearizable & sequentially consistent
b)
linearizable & not sequentially consistent
c)
not linearizable & sequentially consistent
d)
not linearizable & not sequentially consistent