Introduction To Operating Systems

Operating Systems Part 1

ยท

5 min read

Introduction To Operating Systems

Introduction To Operating Systems & It's Functions

Operating system is a software which works in kernel mode as an interface between computer hardware and the applications for end users. Examples include Windows, Linux, Android, MacOS etc.

Without an operating system, users would need to write commands or programs for every small task, making the interaction between user and hardware complex, tedious and time consuming.

KAvPprg.png

Primary goals of OS is to provide

  1. Convenience - Easy to use. Windows had acquired 95% market share in early 2000s because it was easy to use.
  2. High Throughput - More number of tasks executed per unit time. Linux provides high throughput.

Major Functionalities of OS include

  1. Resource Management - In servers, when multiple user access the server in parallel. the OS decides how much hardware needs to be allocated to each of them. Useful in parallel processing.
  2. Process Management - CPU Scheduling algorithms to execute multiple processes.
  3. Storage Management - Done through file system. Secondary storage devices like HDD, SSD etc are used by the OS to store data permanently.
  4. Memory Management - A process that needs to be executed needs to be brought into the RAM or primary memory. Allocation and deallocation of processes in RAM is managed by OS.
  5. Security & Privacy - Authentication, encryption, prevents processes from interfering other processes.

Types of Operating Systems

  1. Batch
  2. Multi-programmed
  3. Multitasking
  4. Real Time OS
  5. Distributed
  6. Clustered
  7. Embedded

Batch Operating System

  • Used in 1960s.
  • A batch of similar kind of jobs is created and given to OS for execution.
  • Punch cards, paper tape, magnetic tape were used to create the jobs.
  • The jobs were given to an operator.
  • Operator creates batches of similar kinds of jobs.
  • Operator gives each batch one by one to the CPU for execution
  • If the processes required I/O operations, the CPU remained idle during that time, which is a major drawback of Batch OS.
  • CPU doesnt move to next job when it is idle due to I/O operations, which led to lot of time-consumption and inefficiency.
  • Later on IBM came out with Fortran, IBSYS709X, which had monitors, and the jobs could be given to the CPU directly without needing an operator.

Multiprogrammed Operating System

  • Non-preemptive CPU scheduling of multiple processes within a RAM.
  • Non-preemptive means CPU doesnt move to the next processes till it hasn't completely executed the current process, unless the process itself invokes an I/O operation or some other kind of interrupt.
  • In the meantime, the CPU moves to the next process.
  • This leads to better utilization of CPU, less CPU idleness, improved efficiency, higher throughput.

Multi-Tasking/Time Sharing Operating System

  • Preemptive CPU Scheduling of multiple processes within a RAM.
  • Premptive means the CPU executes a process for a defined time and moves to the next process.
  • If the process doesnt get executed in that time, it is scheduled to be executed again in future.
  • Leads to better response times, better responsiveness by the CPU. Along with that, all the advantages of multiprogramming OS is also present.

Real Time Operating System

  • Two types - Hard & Soft Real Time OS.
  • Involves time constraints
  • There should be no delay between process invokation and execution by CPU.
  • Hard Real Time OS - No time constraints or delays allowed. Used in high priority critical applications where the responses have to be immediate. Applications include military, alarm systems etc.
  • Soft Real Time OS - Used in non-critical situations where some amount of delay can be tolerated. Applications are gaming, live video streaming etc.

Distributed Operating System

  • The execution environment is distributed to multiple devices spread across in different geographical locations.
  • Each peripheral is loosely coupled with a central server through networking.
  • Each peripheral has it's own memory, CPU etc and is connected with the entire network.
  • If one device fails, that work can be done by other devices available.
  • Availability and Fault tolerance is high.
  • Load balancing can be done.
  • Highly scalable.

Clustered Operating System

  • Multiple devices connected to each other in a local network, creating a cluster.
  • All devices act as one computer, and the computing power increases.
  • Used in supercomputers.
  • Availability and Fault tolerance is high.
  • Load balancing can be done.
  • Highly scalable.

Embedded Operating System

  • Made for a fixed functionality.
  • Suitable for performing certain dedicated tasks repeatedly.
  • Used in microcontrollers.

Conclusion

You can read other articles written by me through these links.

Operating System Series
1. Introduction & Types of OS
2. Process States & Lifecycle
3. System Calls
4. User Mode vs Kernel Mode
5. CPU Process Scheduling
6. Process Synchronization
7. Deadlocks
8. Memory Management
9. Disk Management & Scheduling
10. File System in OS
11. Protection & Security

System Design Series
Introduction To Parallel Computing
Deep Dive Into Virtualization
Insights Into Distributed Computing

Cloud Computing Series
1. Cloud Service Models
2. Cloud Deployment Models
3. Cloud Security
4. Cloud Architecture
5. Cloud Storage
6. Networking In The Cloud
7. Cloud Cost Management
8. DevOps In Cloud & CI/CD
9. Serverless Computing
10. Container Orchestration
11. Cloud Migration
12. Cloud Monitoring & Management
13. Edge Computing In Cloud
14. Machine Learning In Cloud

Computer Networking Series
1. Computer Networking Fundamentals
2. OSI Model
3. TCP/IP Model : Application Layer
4. TCP/IP Model : Transport Layer
5. TCP/IP Model : Network Layer
6. TCP/IP Model : Data Link Layer

Version Control Series
1. Complete Guide to Git Commands
2. Create & Merge Pull Requests
3. Making Open Source Contributions

Linux
Complete Guide to Linux Commands

Thanks For Reading! ๐Ÿ’™
Garvit Singh

ย