Introduction to OS
Why do we need an operating system?
For example, when we use the TikTok app, it requires basic components such as the CPU, GPU, memory, and disk space. These components are the essentials of a basic computer. If we imagine a scenario where there's no operating system managing these resources, TikTok would consume all available CPU, GPU, memory, and disk space. As a result, if we then try to play a resource-intensive game like PUBG, it wouldn't run properly because TikTok has already taken up all the necessary resources.
What is an OS?
We add an operating system (OS) as a management layer to prevent such issues. The OS helps allocate and manage resources efficiently. It ensures that resources like CPU, GPU, memory, and disk space are divided based on the requirements of different apps, preventing any single app from monopolizing them. This allows multiple applications, such as TikTok and PUBG, to run smoothly simultaneously.
An operating system (OS) functions similarly to a banker at a bank. When you request money, the banker asks you to fill out a slip and then retrieves the money from the vault on your behalf—you don't accompany them. Likewise, the OS acts as an intermediary, preventing applications from directly accessing hardware resources.
If OS wasn't present, then the apps would become bulky. This is because each and every app had to contain a separate code for memory management and resource management. So here the existence of OS plays a very crucial role as all these memory management code and resource management code will be present in the codebase of OS.
Without an operating system (OS), applications would lack isolation from each other. Isolation ensures that apps like TikTok and PUBG are unaware of each other's existence and cannot interfere with each other. Without an OS, one app could write arbitrary data into another app's space. For instance, if you have 100% health in PUBG, another app could overwrite this data, potentially leaving you with only 20
percent health.
Comments
Post a Comment