OOPS

Thread

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.

Mutual Exclusion

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-Tasking

Multi-process: Multiple processes.

Concurrency: Multi-threading.

Lifecycle Of A Thread

Publish Subscribe Algorithm ?

Thread Synchronization

Thread synchronization in Java is done with:

Keywords & Methods: