(This part of the original link, translation link, translator: Bjsuo, proofreading: Zheng Xudong)
in concurrent programming, there are two basic execution units: processes and threads. In the Java language, concurrent programming is most concerned with threading, however, the process is also very important.
There are many active processes and threads, even in a computer system with a single execution core. Therefore, at any given moment, only one thread is actually executing. Processor processing time is shared across processes and threads through the operating system's time slices.
It is now more common to have multiprocessor computers with multiple processors or multi-processor execution cores, which greatly enhances the throughput of processes and threads that the system concurrently executes-but is still possible in a simple system that does not have multiple processors or executes the kernel.
process
Process has a separate execution environment. Typically, a process has a complete, private set of basic run resources. In particular, each process has its own memory space. The
process is often seen as a synonym for a program or application, however, a separate application that the user sees may actually be a set of mutually collaborative processes. To facilitate communication between processes, most operating systems support interprocess communication (IPC), such as pipes and sockets. IPC not only supports communication on the same system, but also supports different systems.   Most implementations of the
Java Virtual machine are single-process. Java apps can use Processbuilder objects to create additional processes, and multi-process applications are beyond the scope of this lesson.
thread
threads are sometimes referred to as lightweight processes. Both the process and the thread provide an execution environment, but creating a new line turndown requires less resources to create a new process. the
thread exists in the process-there is at least one thread per process. Threads share the resources of the process, including memory and open files. This improves efficiency, but the potential problem is communication between threads.
Multi-threaded execution is a fundamental feature of the Java platform. Each application has at least one thread – or several, if the "system" thread is counted, such as memory management and signal processing. But from the programmer's point of view, there is only one thread to start, called the main path. This thread has the ability to create additional threads.
Dark Horse Programmer _ processes and threads