Operating System

Operating System

Introduction

An operating system, commonly known as OS, is an essential software program that manages all the hardware and software resources of a computer system. It acts as an intermediary between the computer hardware and the applications software. In this article, we will discuss what an operating system is, why it is necessary, and the problems that can arise without an operating system, using real-life examples

What is the Operating system?

Before we know what an operating system is, let's see why we need an operating system with examples.

Why do we need an operating system?

Let's understand with an example, You are running your YouTube on a small computer that contains a CPU, memory, GPU, and disk. YouTube requires some CPU, memory, GPU, and disk resources. Since there is no operating system in place, YouTube is directly accessing these resources.

You want to use Google, but its resources are being taken up by YouTube and there are no resources available for Google. You have sufficient resources to use both applications, so you can allocate some resources to each application. The operating system layer will ensure that resources are allocated in a correct and efficient manner.

With this, we understand that it managing the resources. So, it is known as Resource management.

Os as a resource manager:

In technical terms, Os acts as an interface.

Interfaces are tools and concepts that technology developers use as points of interaction between hardware and software components.

Let's understand with an example, we all go to the bank, the person is you and you want to withdraw some money that is deposited in the bank. You went to the bank and you asked the person in the bank that you want to withdraw money. The bank person instructs you to fill in the slip, fill in your details then he will give you the amount. Here, you are not going to the locker of the bank, you are going through the bank person. The bank person takes the money from the locker and then gives it to you.

Here, the bank person is working as an interface. you are not going to the locker, the bank person is going. So, the bank person is the interface.

The person is app and the bank person is Interface and the locker is the resources like CPU, GPU...So we understood that OS is acting as an interface between the resources and the user app

problems with not having os

Resource management

For the youtube and Google applications, it writes the code of the application and it also needs to write code for memory management and resource management.

As the code increases, the app becomes bulky. With this, we are violating the DRY rule. The DRY rule is Do Not Repeat Yourself, It means calling again and again as functions in the programming languages. Here, we are writing resource management and memory management code for both applications youtube and Google. The Operating system handles the Resource management code and we do not need to write the code for resource management.

Another problem with not having OS

Isolation and protection

Let's say an example, Youtube is in the memory and Google is also in the memory, when you are on it, youtube uses some memory, and Google also took some memory. If we see their memories separately, if OS is not there, no isolation is present. Isolation means both memories should be apart from each other, youtube should be unaware of Google. If OS is not there, it may be possible Youtube may write something in Google memory. Google was thinking that it is running independently, but other apps came and wrote something, this is a security violation, and there will be no memory protection.

If OS comes into the picture, it will logically store the section of memory allocated to Youtube. Now OS will control that youtube should be unaware of Google, and both memories should be separated. So, In this way, OS will provide memory isolation and protection to multiple apps.

What is an Operating System?

An Operating System is a piece of software that manages all the resources of a computer system, both hardware, and software provide an environment in which the user can execute his/her programs in a convenient and efficient manner by hiding the underlying complexity of the hardware and acting as a resource manager.

Examples of Operating Systems :

1. Windows: Microsoft created the well-known operating system known as Windows. It is utilized by servers, personal computers, and other hardware.

2. macOS: Apple created the macOS operating system computer. It has a graphical user interface and cutting-edge multimedia functions.

  1. Linux: Used in servers and other devices, Linux is an open-source operating system. It offers sophisticated customization and security features.

  2. Android: Google created the Android operating system for mobile devices like smartphones and tablets. It gives people a means to use the apps and services that are available on their devices.

    Operating system goals

There are two main goals of an Operating System:

  1. Convenience:

    The primary goal of OS is to make computer systems easier for users i.e OS makes the interaction between the user and hardware.

  2. Efficiency:

    The secondary goal of OS is to allocate the system resources to various application programs as efficiently as possible.

Operating System Functions

Following are some of the important functions of an Operating System

  • Memory Management

    Memory Management is the process of managing memory. The Operating System keeps track of Memory i.e., what parts of it are in use by whom, and the OS decides which process will get the memory when and how much.

  • Processor Management

    In a Multiprogramming environment, the OS decides which process gets the processor when and for how much time. The function is called Process Scheduling.

  • Device Management

    An Operating system keeps track of all devices and decides which process gets the device when and for how much time.

  • File Management

    The Operating system manages the files in an efficient way and keeps track of information, location, and uses.

  • Operating System also provides security.

Conclusion

The operating system plays an important role in the computer system. As the computer system consists of hardware and software. The operating system provides the interface for the proper use of these resources in the operation of the system. In this article, we discussed brief information on Operating Systems with examples.

Connect with me:

Click Here

I hope you will find this article insightful and share what you understand from the article in the comments.