wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

If quizzes are quizzical, what are tests?

Total questions: 13

Worksheet time: 8mins

Name
Class
Date
1.

When is a pipeline considered balanced?

a)

All stages take the same time

b)

No duplicate stages

c)

The first stage takes the longest

d)

Latency doesn't decrease over time

2.

What is the value of the critical path?

a)

340

b)

420

c)

100

d)

210

3.

How many processor are minimally needed for the best execution time?

a)

2

b)

3

c)

4

d)

5

4.

What is a "map" operation?

a)

Outputting a single value based on an array

b)

Modifying each element of an array independent of eachother

c)

Modifying elements of an array depending on other elements

d)

Modifying an array & Outputting a single value

5.

Which of the following must correct locks fulfill?

a)

Fairness

b)

Starvation-Freedom

c)

Mutual Exclusion

d)

Optimal use of computing resources

e)

Deadlock-Freedom

6.

Which locks can be used for n-locks with only atomic registers?

a)

CAS-Lock

b)

Bakery Lock

c)

Peterson Lock

d)

Filter Lock

7.

Which of the following are starvation-free?

a)

Filter-Lock

b)

TAS-Lock

c)

Java's "synchronized" keyword

d)

Bakery-Lock

e)

Communism

8.

Considering Amdahl's Law, what limits the maximal possible speedup?

a)

The maximum number of processors in a machine.

b)

The sequential parts of the program.

c)

The energy consumption of a machine.

d)

It states that there is no limit.

9.

A semaphore can be used to implement a normal lock

a)

True

b)

False

10.

p2 & q2 being the critical sections, mark the correct answers

a)

This program can deadlock

b)

This program can livelock

c)

This program provides mutual exclusion

d)

This program is (most likely) a lock

11.

"The involved threads do not advance to the critical section but constantly change their state" is called...

a)

Mutual Exclusion

b)

Starvation

c)

Livelock

d)

Deadlock

12.

Pick the correct answers regarding locks

a)

The Peterson Lock is starvation free

b)

The Filter Lock is fair

c)

The Bakery Lock supports more than two threads

d)

The Peterson Lock extends the Filter Lock to support more than two threads

13.

Which is the most powerful Java lock?

a)

synchronized keyword

b)

ReentrantLock

c)

Semaphore

d)

Monitor