Processes and Threads, Mutex, Thread Synchronization

Rizvan Saatov
3 min readNov 30, 2021

Sometimes people confuse those concepts so I decided to write about them in order to make it clear to you.

What is a Process?

A process is an OS-provided abstraction of a running program. When you write a program, it is nothing more than a lifeless file on the hard drive. When you run it, the operating system creates a process out of it.

So, a process is a type of program that executes. This implies that if you open two browser windows, even though they are both executing the same program, you will have two processes.

The execution status of a process is represented by its state.

What is a Thread?

Within a process, a thread is the unit of execution. It’s also known as the “lightweight” method. The address space for all threads in a single process is the same. It means they’re sharing memory machine states, which means they’re not protected from each other.

A process can be partitioned into many threads of operation in modern operating systems. Except for information directly linked to execution, all process management information is shared among threads inside a process.

What is Multithreading?

Multithreading is the execution of several threads in the same or different processes.

--

--

Rizvan Saatov
Rizvan Saatov

Written by Rizvan Saatov

Small sparks make an influence such as a butterfly effect🤞 Cloud/DevOps Engineer🚀 Linkedin: http://linkedin.com/in/rizvan-saatov 💻 Cascloudops.com

Responses (1)