Processes vs Threads

Metehan Akbaba
2 min readSep 22, 2021

--

When we say a task a multitasking is an tasks are basically the same thing as a process. We basically use those terms interchangeably and the task is kind of the more generic concept a process is a more specific concept in the kernel. They’re basically the same thing but threads are actually very different.

It’s really important to understand the differences between these at least if you’re looking at this kind of like parallel performance. A process is a top level execution container. We can think of this as like an application like an application is a process is technically possible for an application have more than one process but usually it’s about one to one. Inside of a process they have their own memory space that is dedicated just for them like the operating system will start up one of these processes. I’ll give that chunk of memory and says like this is the memory that you’re allowed to use. These processes can’t actually talk to memory given to any other process unless there’s a bug in the operating system at which point we get all kinds of things. This is actually how viruses worked by the way as they try to break out of this little memory container. However, assuming you’re not a virus writer, I hope none of us are. We’re playing safely inside of this memory space now what this means is if we do happen to have two or more processes. We want to have them communicate to each other that’s actually we have to kind of do some work to do that so we have to use a thing that is simply called inter process communication or IPC.

--

--