Introduction
What is an OS?
OS- An interface between computer hardware and the user
What happens if there is no OS?
If user wants to access the devices on the PCB, user would have to write a program to access the device
What are the functionalities of an OS?
- Resource Manager
If a number of users are trying to access some hardware/device, we need a resource manager to allocate and de-allocate resources continuously (esp. in parallel processing)
- Process Management
CPU scheduling - executing multiple processes at the same time (eg chrome, vs code, spotify)
- Storage Management
How to store data on a system - stores through filesystem - how to store permanently
- Memory Management
Limited memory - processes which need to execute come to the RAM before going to the CPU - allocation and de-allocation from RAM continuously
- Security
Blocking cross process data access - security in the form of authentication - permissions (sudo)
What are the various types of Operating Systems?
- Batch OS - batch of similar kind of jobs given to CPU to be computed - data/jobs loaded on punch cards - go to the system - give to operator - operator makes a batch of jobs - get results - CPU does not go the next job unless first job is completed (non-pre-emptive)
- Multiprogramming OS -
- We bring multiple processes into the RAM - as many as we can
- Non pre-emptive execution (scheduling)
- For eg - if P1 goes to CPU - CPU will try to execute P1 completely unless P1 wants IO. In that case, CPU sends P1 to IO manager and brings in another process P2 for execution.
- Focus on decreasing idleness
- Multitasking OS (timesharing) -
- Pre-emptive scheduling
- Fixed time slots for each process, regardless of whether all instructions are complete or not
- Improves response time (more responsive)
- Real Time OS -
- Real time environment, cannot afford delays
- Hard - No delay can be bared at any cost (eg missile launch)
- Soft - No critical situation so we can afford a little bit of delay (eg. YT live)
- Distributed OS -
- Geographically separated machines
- Connected via a network
- Loosely couple environment
- Improves availability, fault tolerance, scalability
- Clustered OS -
- Different machines connected via a local network
- Improves computation power
- Improves availability, fault tolerance, scalability
- Embedded Systems -
- Works on fixed functionality
- Cannot be changed, can only handle whatever was programmed into it and stored on the circuit board
- eg washing machines, oven, AC
Processes