Concurrent execution of multiple programs at a time (running Word and Chrome simultaneously) is Multiprogramming. Likewise, execution of multiple tasks ( processes, programs, threads etc.) at a time is Multitasking. The major difference between them is, multi-programming works solely on the concept of context switching, whereas multi-tasking is based on time sharing.

Multithreading is a process of concurrent execution of two or more parts of a program, for maximum utilization of CPU. Also, Multithreading is an extension of multitasking, where you can sub-divide specific operations within a single application, into individual threads. Each of these threads can run in parallel. The Operating System divides processing time, not only among different applications, but also among each thread within an application. It enables you to write a program in a way where multiple activities can proceed concurrently.

#java #jvm #multithreading #programming #threads

Java | Multithreading
1.55 GEEK