SHREE LEARNING ACADEMY

Functions of Operating System

Your operating system does a thousands of jobs everyday and it's really hard to pin down each and every job. Therefore for today we will discuss a few of the most important functions of the operating system so let's get started

1. Resource management

Resource management includes multiplexing which is sharing in this case. There are two types of multiplexing, time multiplexing and space multiplexing. We already know there are dozens of programs running simultaneously on the computer and we also know the number of programs is greater when compared to the number of resources. So it's better to share the resources with the programs rather than buying resources for each and every program until you want to sign a billion dollar cheque.

When we talk about time multiplexing, it means we are sharing the resources with respect to time. In a time multiplexing system, operating system allocates the resources to a program for a specified time period, when this time period runs out, these same resources are allocated to another program for again a specified time. This cycle runs until all the programs are finished executing.

For example CPUs are time multiplexed, where one program executes with the help of CPU for a few milliseconds and then another program executes again for a few milliseconds depending on the operating system.

Now when we talk about space multiplexing it means we are sharing the resources with respect to space. In a space multiplexing system an operating system allocates resources to the programs by dividing these resources and providing only a portion of a resource to a particular program so if there are four programs the resource will be divided into four and everyone will get a portion of it to execute.

For example RAM is space multiplexed where each program gets a portion of it which helps them to execute.

2. Process management

Operating system controls the execution of processes. Operating system is responsible for creating, executing, and deleting the user as well as the system processes. The operating system can stop a process from executing, resume it later or cancel it forever. Processes are also scheduled by the operating system. Process scheduling is a wide concept where there are multiple algorithms and concepts which we need to learn but we will look at them in later chapters, for now just understand that like your daily schedule Operating system also plans and schedules which process should execute next. It creates a list of the processes in order in which they should execute and uses it so that the precious time of CPU is not wasted. Interprocess communication and deadlock handling are also the functions of OS. Again these two are wide concepts. Interprocess communication means communication between two processes and deadlock is a situation where all the processes are blocked as each one of them are holding the resources and waiting for another resource which is acquired by another process. We will look into these concepts in detail in coming chapters.

3. Memory management

When we talk about memory it means we are talking about RAM which is also known as primary memory. Memory is allocated to the processes so that they can execute. After execution of the process the memory is freed and reallocated to another process. An operating system also needs to keep a track on memory.

4. File management

An operating system is held responsible for creating and deleting files and directories in the system, maintaining a good backup of the files, providing access to the files and at last file security.

5. Device management

For programmers it's easy to write the code directly rather than understanding how all hardware works and if they are needed to understand all these it would be a terrific task for the programmers and no code would have ever been written that is why we have operating system .The operating system talks to bare hardware directly with the help of drivers, the programmers then uses the drivers to perform actions on hardware and then as a user we use the programmer's program to get our work done.

So user calls the program, program calls the os, which calls the drivers and finally the driver talks to the hardware.

Note. Drivers are a part of OS

6. Providing user interface

Operating system provides the user a way to interact with the system it can be with the help of command prompts i.e. shell (The shell has some inbuilt commands which the user need to type to get his or her work done) Or it can be with the help of graphical user interface known as GUI. Whenever you use your computer you see sophisticated graphics and icons, you see a clean way to interact with the system that is with the help of graphical user interface which is provided by your operating system.

7. Booting the computer

Booting the computer means simply turning it on. There are two types of booting, a warm boot and a cold boot when the computer completely shuts down and after some time it is switched on it is called as cold boot and when we use our operating system to restart the computer it is known as warm boot.

8. Some other functions

Some other functions of operating system are providing security to the system by updating the inbuilt antivirus, keeping track of the firewall, regularly checking for malicious codes, providing security patches, encrypting the storage, Providing networking capabilities, maintaining multiple user accounts, keeping track of errors and logs, optimising system performance, and a lot more...


Test Yourself
Take Free Quiz