Threads Flashcards
Which Thread method enables a thread to wait on another thread before continuing its work?
join
Which Thread method executes the run method on a child thread?
start
Which term describes how responsive an application is during execution?
Liveness
Liveness
A concurrent application’s ability to execute in a timely manner is known as its liveness.
What types of problems can effect an applications liveness?
deadlock, starvation, livelock
Which term occurs when one or more threads access a shared resource so frequently that other threads are unable to gain needed access?
starvation
Which term describes controlled thread access to a shared resource, so as to reduce the likelihood of memory consistency errors between threads?
Synchronization
What is the effect of invoking the start method more than once on the same thread?
An IllegalThreadStateException is thrown.
Which term describes actions that are indivisible and cannot be stopped prematurely before they complete?
Atomicity
Which Thread attribute is used to control the relative likelihood and frequency that a thread will be given a time slice to execute?
priority
What is the Thread priority range?
1-10
Which term occurs when two or more threads are blocked forever while waiting for access to the same resource and are unable to complete their tasks?
Deadlock
Which keyword declares a method, block, or code that is limited to a single concurrent thread?
synchronized
Which term occurs when two or more threads are too busy responding to each other to complete their tasks?
livelock
Which Thread attribute is used to control whether the JVM may exit before the thread terminates?
daemon