What is Operating System – Introduction to OS

An operating system links the user and the computer system. Programs can’t run without the presence of an Operating System. It is the only program running on the computer, others being application programs.

An OS acts as a resource manager and allocates and coordinates resources to specific programs and users, when necessary. Some of these resources are processor, memory, files, and I/O devices. Some of the popular OSs are Linux OS, Windows OS, VMS, OS/400, AIX, z/OS, etc. It controls the execution of all kinds of programs in a system.

Views of an OS

Following are the two views of an OS:

User View: This is the interface that is in use and is designed for a single user. This allows a user to monopolize system resources to the maximum. It provides ease of use, with little performance, and very poor resource utilization.

System View: This provides the view of an OS as a resource allocator. The OS manages resources efficiently, decides between conflicting requests, controls program execution, and many more.

Functions of Operating System

Following are the functions of an OS:

  • Boots the computer
  • Performs basic computer tasks like managing peripheral devices, etc…
  • Provides user interface.
  • Efficient management of system resources.
  • Performs file management i.e, manipulating, storing, retrieving, and saving data.
  • It performs error handling.

Services of an Operating System

Following are the functions of an OS:

  • Memory Management: Management of Primary Memory
  • Processor Management: Decides which process gets the CPU when and for how long.
  • Storage Management: It handles storage allocation and manages hard disks.
  • Device Management: Manages device communication through their device drivers.
  • File Management: Manages and keeps track of files and directories in the system.
  • Security: Prevents unauthorised access
  • Control over system performance: Increases response time and decreases delays in system calls
  • Job accounting: Keeps track of time and resources used by tasks and users.
  • Error detecting aids: Error detection and debugging
  • Coordination between software and users: Coordinates and assigns compilers, interpreters, assemblers, etc.

Features of Operating System

Following are the features of a good OS:

  • Make computers convenient to use.
  • Helps use resources efficiently.
  • It evolves over time and allows the introduction of new functions without interfering with services.
  • It should give maximum throughput.

Properties of Operating System

Following are some important properties of an OS:

  • Batch processing: Processes jobs in batches.
  • Multitasking: Executes multiple tasks simultaneously.
  • Multiprogramming: Executes processes parallely on the same processor.
  • Distributive environment: Multiple independent processors come together to form a distributive environment.
  • Interactivity: Helps a user interact with a system.
  • Real-Time system: Dedicated embedded systems are called real-time systems.
  • Spooling: It pushes data of various I/O jobs in a buffer or disk.

Purpose of an OS

Following are the two purposes of an OS:

1. Allocates processes and handles system resources along with various users and tasks.

2. Provides an interface between the computer hardware and the programmer further simplifying the creation, coding, and debugging of programs.

History of Operating System

Generation Year Electronic Device Types of OS
1945 – 1955 Vacuum Tubes Plug Boards
1955 – 1965 Transistors Batch Systems
1965 – 1980 Integrated Circuits (IC) Multiprogramming
1980 – Present Large Scale Integration PC

Types of Operating Systems

Following are some common types of operating systems:

1. Batch Operating System: Executes jobs in batches without manual interventions.

2. Time-sharing operating System: Multiple users share computer resources and ensure maximum utilization of resources.

3. Distributed operating System: Manages different computers and makes them appear to be a single system.

4. Network operating system: Connects computers running on different OSs through a common network.

5. Real-time operating system: For applications with fixed deadlines or tight response time.

Process Scheduling

A process is a program being executed by an OS. Process scheduling is the process of scheduling a process into different states like ready, waiting, and running. There are two categories of scheduling: preemptive and non-preemptive.

Scheduling Algorithms

A scheduling algorithm schedules processes on the processor. Following are some popular process scheduling algorithms:

1. First-Come, First-Served (FCFS) Scheduling

2. Shortest-Job-Next (SJN) Scheduling

3. Priority Scheduling

4. Shortest Remaining Time

5. Round Robin(RR) Scheduling

6. Multiple-Level Queues Scheduling

7. Multilevel Feedback Queues Scheduling

8. Highest Response Ratio Next

Advantages of an Operating System

Following are the advantages of an OS:

  • Helps improve system efficiency and reduces complexity.
  • Every component is independent of the other. Thus, the failure of one doesn’t affect the other.
  • Acts as an interface between the hardware and the software.
  • Easy access to hardware without writing large programs.
  • Users can share data easily with multiple users.
  • Installation of applications becomes easier.
  • Can be updated and refreshed frequently and easily.
  • Many OSs are open source i.e., free to use.
  • Hides hardware complexity.
  • Makes programming and multitasking easier.

Disadvantages of Operating System

Following are the disadvantages of an OS:

  • Though some OSs are open-source some are expensive too. Usually, OSs with GUI functionality and other in-built features are quite expensive.
  • Most times OSs are open to virus attacks. Sometimes a user might download malicious software packages affecting the functioning and speed of the OS.
  • Most OSs are complex in nature as the language in which they are established isn’t clear and well defined. This makes it difficult for a user to resolve an issue.
  • If the OS crashes, the whole system will crash.

Summary

An OS doesn’t exactly perform any useful function but provides an environment within the system so that programs can do useful work. There are two views of an OS: User view and System view. Process scheduling is the process of scheduling a process into different states. A scheduling algorithm schedules processes on the processor.