Unit 04 Flashcards
bytecode
The ‘machine code’ of the Java Virtual Machine, i.e. the result of compiling a Java program.
bytecode verifier
The part of the Java Virtual Machine that checks whether the bytecode about to be executed has not been tampered with.
class loader
A part of the Java Virtual Machine that loads classes at runtime into the Java Virtual Machine’s memory. Java developers can implement their own specialised class loaders.
conditionally thread-safe class
A class that requires some external synchronisation to achieve thread safety. For example, individual accesses may not need external synchronisation, but a sequence of them might.
contention
A situation in which multiple threads are attempting to obtain the same resource.
countdown latch
A flexible thread-coordination mechanism that makes one group of threads wait for each of N other threads to reach a certain point in their execution, with N being the initial value of the latch’s counter.
divide-and-conquer strategy
A problem-solving strategy that breaks down a problem into subproblems of the same or similar type, continuing the process until the obtained subproblems are simple enough to be solved directly.
external synchronisation
Synchronisation done by the callers of methods.
factory method
A method that creates objects. Typically, a factory method is a static method that hides the concrete class of the returned object: the client knows only which interface the object implements.
fail-fast operation
An operation that fails as soon as it detects some violation to consistency invariants. For example, iterators over pre-Java 1.5 collections throw an exception as soon as they detect that another thread is modifying the collection.
garbage collection
A runtime technique to free the memory occupied by objects that are no longer used. The Java Virtual Machine specification does not impose any specific garbage collection algorithm.
green thread
A thread that is not visible to the operating system and has to be created, scheduled and terminated by the Java Virtual Machine.
immutable class
A thread-safe class whose instances never change once they have been created.
internal synchronisation
Synchronisation done by the methods themselves.
interpreter
A program that executes another program.