A small path of execution of a program is called a thread.
Threads have two types primarily:
An operating system has various threads & subroutines for various things like I/O, networking & print spooler etc.
The order of execution is not defined in two or more independently existing/running threads.
Mutual exclusion gives programmer ability to define/control this behavior (the order of execution & synchronization etc.).
Leslie Lamport
Multi-process: Multiple processes.
Concurrency: Multi-threading.
Thread synchronization in Java is done with:
Keywords & Methods:
wait
notifyAll
synchronized