An Introduction to Operating System
Tags: beginners, webdev, programming, linux
Published: 2022-10-31 03:56:52

## Introduction
An Operating System is an _interface between user and the hardware or between software and hardware_. A Backend developer should be clear and crisp with the concepts of operating systems. OS has many purposes ranging from file management, memory management, process management, handling inputs and outputs etc. And that’s more or less the same thing a backend developer is expected to do, and so OS knowledge is indispensable.

The three most common operating systems for personal computers are 

- Microsoft Windows, 
- MacOS, 
- Android,
- Linux.

Obviously for some people, reading different generations of OS is so boring, but still there exist few obsessed souls who want to know about that too, and here is an [article](https://www.tutorialspoint.com/operating_system/os_overview.htm) for that

## How Operation System work. 
 

Computer CPU knows how to execute commands. But it needs someone to tell him what command to execute. It is the job of Operation System (OS). Whenever you power your computer, it reads first bytes on your Disk Drive, where it expects to see commands that will start Operation System.

Important functions of an operating System.

- Memory Management
- Processor Management
- Device Management
- File Management
- Network Management
- Security
- Control over system performance
- Job accounting
- Error detecting aids
- Coordination between other software and users

## Memory Management:
Memory management refers to **managing primary memory**. Primary or Main memory is a large array of words (4 bytes), with each of them having their own address. And so, it can easily by accessed by the CPU. 
Any program that is currently running resides in main memory, because since each word has its own address, OS takes the responsibility of storing which program is accessing what part. It takes care of the allocation and deallocation accordingly.

## Process Scheduling:
This is the process of **scheduling different processe**s for accessing processor. Here OS keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller.

## Device Management:
OS manages devices using drivers. OS keeps **tracks of all devices** and tracks which process uses what device for how much duration. Program responsible for this task is known as the I/O controller.

## File Management:
A file in any computer in organized in form of **directories**, for easy navigation and access. An OS keeps of track of 
The name  of the file is divided into two parts as shown below:
•	name
•	extension, separated by a period.

Collection of files is a file directory. The directory contains information about the files, including attributes, location and ownership. Much of this information, especially that is concerned with storage, is managed by the operating system.

Apart from the above tasks, OS has few other operations too, A few of them are:

- **Security** − By means of password and similar other techniques, it prevents unauthorized access to programs and data. 
- **Error detecting aids** − Production of dumps, traces, error messages, and other debugging and error detecting aids.
- **Job accounting** − Keeping track of time and resources used by various jobs and users.

## Resources:

- [Operating Systems Basics](https://www.youtube.com/watch?v=9GDX-IyZ_C8)
- [Operating Systems Concepts](https://codex.cs.yale.edu/avi/os-book/OS10/index.html)