12 Threads in Java
12.1 INTRODUCTION
Running multiple programs/task on a computer is termed as multitasking. For example, running an MS-Word application and Visual C++ application at the same time is an example of multitasking. Each running instance of a program in memory is known as a process. Each process has a single unit of execution which is a thread. Thus, running multiple programs from user's point of view is multitasking, but from operating system's point of view, it is multithreading, which is also known as concurrent programming.
A process has a self-contained execution environment. A process generally has a complete, private set of basic run-time resources; in particular, each process has its own memory space. A multitasking operating ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access