DEV Community

</AnIrBaN>
</AnIrBaN>

Posted on

What's actually an OS??

Many of us have heard this word "OS" in our day-to-day life or may be dealing with it in our own electronic devices . But whats actually an OS? Hm interesting .. Lets deep dive into it

Intro to OS

If you are reading this post, so of course , atleast you have run a simple application in your device. Alright ! lets say Instagram . So imagine there's no concept of Operating system(OS) yet. Theres a simple device made of CPU , disk , GPU and memory(RAM). And we have installed and opened instagram in our device . So now what will happen? It wont open , right? NO! it will run of course , but the app will hijack the whole resource of your device.

So lets suppose after using Instagram for few minutes , you have decided to play a game . But as Instagram has hijacked the whole resources of it , it won't even open and the whole device will get freezed and in short HANG! πŸ₯².

So the main point , what does the OS actually do ?
So this major issue is solved by OS , Its nothing but a program which acts as an interface between the app and the sofwares and hardwares of the device and distributes the resources as per need . Hm dint get it . Fine lets explain a bit more

So lets look into an analogy . Your mom is preparing your lunch in the kitchen and you and your sister have decided to have something from the fridge lets say a juice . But as your mom is there in the kitchen , she will divide the two juice bottles between you and your sister . But another day , your mom has went into the market and again you and your sister have decided to have icecream from the fridge . As your mom isnt there in the kitchen you will take all the icecreams and wont share with your sister (of course , I hope you arent) .

So here in this analogy , Your mom is the OS , you and your sister are the applications and the eatables from the fridge are the resources of the device . If OS isnt there in the device , the app will hijack all the resources and wont let other apps to run . But the OS acts as your mom and it shares the resources among all the softwares. So if you are using instagram , OS will allow the app to use only 5% of CPU , 3% of memory , 4% of GPU (lets say) etc. and you can easily run your applications

But wait wait wait, if the developers of the application write the code for resource management , then is there any need of OS , or is OS useless then ? Lets see this in the next post .

Top comments (0)