What is an operating system and why there's a need of it?

What is an operating system and why there's a need of it?

In this article we will learn about importance of operating sytem and it's definition.

Prerequisite:

  • Basic knowledge of computer programming.

What if there's no Operating System?

If there is no operating system, the computer system would not function properly. Let's consider two popular applications: Microsoft Word and Google Chrome. Without an operating system:

  1. Each application would have to include hardware interaction code in its code base, making it heavy and complex. For example, Microsoft Word would have to include code to interact with the keyboard, mouse, and display. This would make the application bulky and difficult to manage.

  2. One application could monopolize resources, making it impossible for other applications to function. For example, if Google Chrome was using all the CPU time, Microsoft Word would be unable to function correctly. This would make only the app run and other apps will keep waiting infinitely for their chance to get memory and CPU time. This is resource exploitation in absence of an Operating System.

  3. Without an OS, memory could be accessed by any application, leading to crashes, data loss, and security issues. For example, Microsoft Word could access the memory used by Google Chrome, leading to data loss or security issues.

Life without the Operating System

Before the development of operating systems, computer programming was a much more challenging and time-consuming task. These problems were faced by programmers without operating systems -

  1. Lack of Standardization: Because there was no unique way to manage memory, CPU time or hardware resources, every program needs to implement their code to manage resources. This lack of standardization made it difficult to share resources between different programs, and each computer had its own way of implementing resource sharing.

  2. Limited Hardware Resources: The early computers had very limited resources, such as memory and processing power. Programmers had to write very efficient code that used every available resource to its fullest potential.

  3. Time-Consuming: Writing software without an operating system was a very time-consuming task. Programmers had to write every line of code from scratch, including code to manage input/output, memory management, and process management. This made it difficult to develop complex software and limited the number of applications that could be developed.

  4. Debugging was Difficult: Debugging software without an operating system was a very difficult task. Programmers had to manually trace through every line of code to find errors and fix them. This was a time-consuming and error-prone process that made it difficult to develop software quickly.

Overall, life before the development of operating systems was very challenging for programmers. The lack of standardization, limited hardware resources, and time-consuming programming made it difficult to develop complex software.

Also because of writing the same code again and again, the most important principle of computer programming was breaking, the DRY Principle (Don't Repeat Yourself ) and hence there was a great need for one unique code for managing all these things and to solve all the problems that we discussed above.

What features does the operating system provide?

An operating system is essential for a computer system to function properly. It provides the following functionalities:

  1. Access to computer hardware: An OS provides a layer of abstraction between the user and the computer hardware. It allows the user to interact with the computer system without having to deal with the complexities of the hardware. For example, if you want to print a document, you can simply click the print button, and the OS will take care of the rest, also the programmers don't have to think of an inner implementation for managing access to hardware.

  2. Resource management: An operating system manages and allocates resources such as memory, CPU time, and input/output devices. Without an OS, different applications would have to manage these resources on their own, leading to conflicts and inefficiencies.

  3. Hides underlying complexity: An OS hides the underlying complexity of the hardware from the user and provides a user-friendly interface. This makes it easy for users to interact with the computer system without having to learn complex technical details.

  4. Facilitates execution of application programs: The operating system also assures that the memory is shared in an isolated manner, that is same memory is not shared with different applications because that can cause security issues as well as memory conflicts.

What is an operating system?

An operating system (OS) is a piece of software that manages all the resources of a computer system, including hardware and software, and provides an environment in which the user can execute programs conveniently and efficiently by hiding the underlying complexity of the hardware and acting as a resource manager.

The Relationship Between User, Application Programs, Operating System, and Computer Hardware:

The operating system acts as a mediator between the user, application programs, and computer hardware. It provides the means for proper use of the resources in the operation of the computer system.

Conclusion:

  • Operating systems are an essential component of a computer system, providing a platform for running application software while managing system resources.

  • By hiding the complexity of the hardware and acting as a resource manager, the operating system allows users to execute their programs conveniently and efficiently.

  • The importance of operating systems cannot be overstated, and without them, computing as we know it would not be possible.