I think the answers here are either wrong, incomplete, or too complex for an ELI5. Some notes: (1) ELI5’s don’t always have to use analogies, (2) people are forgetting to even explain *what* is a process.
Here’s my attempt. I’ll include a third term *multitasking* because it is too closely related:
A **process** is a program (e.g., an app) running. You have Word running on your laptop? That’s a process. You have Candy Crush running on your phone? That’s a process. The fact that you can have more that one program running at once on one processor core is **multitasking**. That includes running two instances of the same program. You have two instances of notepad.exe open? That’s two processes—a multitasking in action. How can there be multiple processes running on one processor core? The trick is that the processor can actually only run one process at a time, but switches back and forth between several program instructions very rapidly to make it seem like it’s doing everything all at once.
In today’s computers you rarely only have one processor core. When you have multiple processor cores, your computer can actually *physically* run more than one processes at the same time. That is, up to the number of cores it has. This is what we call **multiprocessing**. Imagine at one instance of time, CPU core #1 is running Word program, core #2 is running Excel, and #3, Notepad.
Now, within a process, again, your CPU core can only actually do one thing at a time. For example, when it is busy rendering video to your screen, it cannot at the same time be listening to an input event, e.g., keyboard key press or mouse click. So how can you click the pause button on your media player app and have it actually register the click and pause the video playback? Again, the CPU switches back and forth rapidly between rendering video and listening to mouse click events. In contrast to the previous example (running two processes at the same time), the two activities happen within a single process. To achieve this, there are actually two separate **threads** running within the media player process. One for rendering the video, and one for listening to mouse click events. These threads have access to all the process’ resources. This is called **multithreading**. Now whenever you see that UI elements (buttons, etc.) of an app are not responding to your clicks while the app’s doing some other thing, you know that the app developer did not implement multithreading as god intended.
Edit: granted, this is not quite an ELI5, but I think this is as close as I can get, as I think a real five-year-old would not come up with this question. I think my answer only requires a very basic experience in using a computer and knowing that there’s a thing called a processor (core) inside a computer to be understood.
Latest Answers