# Operating system

## Day 1 1/7

#### OS

* OS is the system software which creates the platform for other software and applications.
  * Interface between user and hardware
  * Resource Allocator
  * Program Controller

![os](https://github.com/shreeshailaya/c-dac/blob/main/Operating%20system/Media/1_os.png)

* **System Software**
* It is the type of computer program that is designed to run computer hardware and application.
* The OS is the is best known example of system software
* OS manage all other programs in computer.
* Some of Example of System Software
  * BIOS
  * Boot Program
  * Assembler
  * Device Driver

#### Finctions of OS

![os](https://github.com/shreeshailaya/c-dac/blob/main/Operating%20system/Media/2_os.png)

* **Command Interpreter** One of the major functions of OS is commands.
* OS need to provide the interface to the user for the communcation with the computer.
* A Command Interpreter is a program which reads the instruction given by the user.
* Command Interpreter provides a user interface to hide hardware details of the system from the user making system more user friendly.
* Two common Method for interfacing
  * Command Line Interface(CLI)
  * Graphical User Interface(GUI)

***

***

## Day 2 2/7

#### Process Management

* Process is "Program in execution".
* It is a part of program which is under execution
* Program is passive entity

![os](https://github.com/shreeshailaya/c-dac/blob/main/Operating%20system/Media/3_process.png)

* **Stack**
* The stack contain the temporary data such as methods/functions,parameters,return address and local variable.
* **DAta**
* The section contains the global and static variables
* **Text**
* This includes the current activaity represented by the value of program counter and contents of the processor's register.
* **Heap**
* This is dynamically allocated memory to process during its runtime this memory can be released once execution is completed

#### State of Process

![os](https://github.com/shreeshailaya/c-dac/blob/main/Operating%20system/Media/4_process.png)

![os](https://github.com/shreeshailaya/c-dac/blob/main/Operating%20system/Media/5_process.png)

#### Context Switching

#### Types of Process

1. I/O Bound
2. CPU Bound

#### Schedulers in OS

![os](https://github.com/shreeshailaya/c-dac/blob/main/Operating%20system/Media/6_schedulers.png)

**Long Term Schedular**

**Short Term Schedular**

**Medium Term Schedular**

* Swap area

#### Linux Command

## Day 3 3/7

## Day 4 5/7

#### Process Scheduling
