WorksheetsIf quizzes are quizzical, what are tests?
Total questions: 13
Worksheet time: 8mins
When is a pipeline considered balanced?
All stages take the same time
No duplicate stages
The first stage takes the longest
Latency doesn't decrease over time
What is the value of the critical path?
340
420
100
210
How many processor are minimally needed for the best execution time?
2
3
4
5
What is a "map" operation?
Outputting a single value based on an array
Modifying each element of an array independent of eachother
Modifying elements of an array depending on other elements
Modifying an array & Outputting a single value
Which of the following must correct locks fulfill?
Fairness
Starvation-Freedom
Mutual Exclusion
Optimal use of computing resources
Deadlock-Freedom
Which locks can be used for n-locks with only atomic registers?
CAS-Lock
Bakery Lock
Peterson Lock
Filter Lock
Which of the following are starvation-free?
Filter-Lock
TAS-Lock
Java's "synchronized" keyword
Bakery-Lock
Communism
Considering Amdahl's Law, what limits the maximal possible speedup?
The maximum number of processors in a machine.
The sequential parts of the program.
The energy consumption of a machine.
It states that there is no limit.
A semaphore can be used to implement a normal lock
True
False
p2 & q2 being the critical sections, mark the correct answers
This program can deadlock
This program can livelock
This program provides mutual exclusion
This program is (most likely) a lock
"The involved threads do not advance to the critical section but constantly change their state" is called...
Mutual Exclusion
Starvation
Livelock
Deadlock
Pick the correct answers regarding locks
The Peterson Lock is starvation free
The Filter Lock is fair
The Bakery Lock supports more than two threads
The Peterson Lock extends the Filter Lock to support more than two threads
Which is the most powerful Java lock?
synchronized keyword
ReentrantLock
Semaphore
Monitor
