This post is for the very beginner.
What is the Operating System(OS)?
Refer to Wikipedia, An operating system(OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Let’s think about Messenger program. Program is the executable instruction set to do some task.
so the Messenger Program is file set of communication via message.
If you use window, click any messenger program and ctrl + alt + delete.
You can see the messenger program is running on the list of process.
Process is
- Program that running on the OS continuously
- Task unit allocated system resources from OS
Computer have to use finite hardware resources efficiently.
Operating system distribute finite resources to process according to PCB(Process Control Block)
Example of System resources are
- CPU time.
- Memory address to running program.
- Region of memory structure composed code, data, stack and heap.
As beginner, Memory is quiet unfamiliar concept to understand.
Let’s think that computer also has limitation to understand and memorize something because of lack of memory like us.
You might be confused several new concept.
Let’s think about Ironman. he need to fight with enemy, run a business and save person at the same time.
But he can do only one thing at once so he uses the Ironman suit to do all the task very quickly.
So it looks everything is working at the same time for great effort of him
Like this, One CPU Operating system shows hallucinations of many process running simultaneously
to user with change the caring process quickly.
How Operating system change the running process very quickly?
Before we click the Messenger program, it is located in Hard drive like SSD.
It would be not proper comparing speed simply while Speed of SSD is 500 MB/s,
CPU processor speed is 1GHz. It means Billions signal traverse the computer in one second.
To overcome the speed difference, we are using Computer memory like RAM(Random Access memory).
It is fast but stored information will be vanish when it turns off(we call it as volatile memory)
and it is much expensive than hard drive.
CPU also use Cashe memory to reduce the speed gap between CPU and Computer memory.
Cashe memory is approximately 5 ~ 10 times faster than computer memory.
So back to process, process is running program on the processor(CPU).
Process has at least one thread(main thread).
Don’t worry about it. this is the last new thing to learn in this post :)
Thread is
- Smallest sequence of executed instrument that can run using allocated resource from process.
- The unit that executing programmed instrument in the process.
We will deep dive on the difference between process and thread later.
Summary
- Computer has executable instruction file set as program.
- When program is running on the processor(CPU), it called as process.
- Operating system allocate system resources to process.
- thread is the unit that executing programmed instrument in the process.
- Process has at least one thread(main thread).
Cheers.
Thank You.