In a a nutshell, an Operating System acts as the interface between you and your machine. It allows you to communicate with your hardware by being an interface. The operating system has two main jobs and in this post we will learn about what they are.
Operating System as a Computer Interface
The architecture of most computers is too basic to program. Think about how you code microprocessors in the assembly level language for tasks as simple as copying a bit of information from one register to another.
Another good example is the read and write operation, each of which requires 13 parameters that are packed into 9 bytes. These parameters specify items such as the recording mode used on the physical medium, addresses of the disk block to be read, the number of sectors per track and some more parameters as such. All of this information becomes obsolete once you have a layer of Operating System.
Let’s take another example for better understanding. Google develops new code for the chrome browser. Now they won’t write the code for the hardware on your system, but they will write it for the operating system you are using, Windows for example. The Windows OS will already know what a mouse click event, keyboard click event is and the browser will be able to use the hardware of your machine through the Windows OS.
Acting as an interface between your software and your hardware is one of the two main jobs of your operating system.
Operating System as a Resource Manager
To understand this aspect, you must first understand that modern computers are all equipped with processors, memories, timers, disks, mice, printers and a lot of other devices. Modern computers are also powerful enough to perform multiple tasks at the same time. The problem arises when 2 or more programs want to use the same resource.
For example, if I have multiple documents open, and I click print then the system shouldn’t print all the pages together on one page. It would become chaotic. Here’s what the Operating System does. It reserves the printer for one document, and when that’s done, it gives the go-ahead to the next document to be printed.
In terms of memory too, the operating system is responsible for distributing memory to each program that is open to avoid crashing down the system.
Operating System is responsible for distributing the resources available in your computer (memory, printers, hard disks, etc.) to each program to maintain order in your system.