Operating System Tutorial

What is Operating System Evolution of Operating System Types of Operating System Functions of Operating System What is Kernel and Types of Kernel Operating System Properties Operating System Services Components of Operating System Needs of the Operating System Linux Operating System Unix Operating System Ubuntu Operating System What is DOS Operating System Difference Between Multi-programming and Multitasking What is Thread and Types of Thread Process Management Process State What is Process Scheduler and Process Queue What is Context Switching What is CPU Scheduling Scheduling Algorithm FCFS (First-come-First-Serve) Scheduling SJF (Shortest Job First) Scheduling Round-Robin CPU Scheduling Priority Based Scheduling HRRN (Highest Response Ratio Next) Scheduling Process Synchronization Lock Variable Mechanism TSL Mechanism Turn Variable Mechanism Interested Variable Mechanism What is Producer-Consumer Problem What is Semaphore in Operating System Monitors in Operating System What is Deadlock Deadlock Avoidance Strategies for Handling Deadlock Deadlock Prevention Deadlock Detection and Recovery Resource Allocation Graph Banker’s Algorithm in Operating System Fixed Partitioning and Dynamic Partitioning Partitioning Algorithms What is Paging and Segmentation What is Demand Paging What is Virtual Memory Disk Scheduling Algorithms FCFS and SSTF Disk Scheduling Algorithm SCAN and C-SCAN Disk Scheduling Algorithm Look and C-Look Disk Scheduling Algorithm File in Operating System File Access Methods in Operating System File Allocation Method Directory Structure in Operating System Difference between C-LOOK and C-SCAN Difference between Rotational Latency and Disk Assess Time Trap vs Interrupt How to implement Monitors using Semaphores N-Step-SCAN Disk Scheduling Why is it critical for the Scheduler to distinguish between I/O-bound and CPU-bound programs Difference between C-SCAN and SSTF Difference between SCAN and FCFS Difference between Seek Time and Disk Access Time Difference between SSTF and LOOK

Evolution of Operating System

Evolution of Operating System

The evolution of various types of operating systems can be briefly described as follows:

Serial Processing

  1. Since 1950, the operating system started to be in use. Before 1950, there were no operating systems, and programmers had to directly communicate with the hardware.  And before 1950, if a programmer wants to execute the programs, the programmer had to follow the following steps:
  2. First, type a program or punched card.
  3. Translate the punch card into a card reader.
  4. The translated card reader is submitted to the computer, and if any error has occurred, then with the help of the light, an error is indicated.
  5. The Programmer looks at the main memory and register to verify the reason behind the error.
  6. Then outputs are taken from the printers.
  7. Then the program is ready to execute another program.

Drawback of Serial Processing

The serial processing is tough for the users because, in serial processing, more time is required. The user cannot start executing another program if the previous program does not complete its execution. In serial processing, the programs are submitted to the computer one-by-one. That’s the reason behind the name of serial processing.

Batch Processing

Before 1960, it was tough to execute a program with the help of the computer. And the reason behind that is, to place a computer we need three rooms, one room is required for the card reader, the second room is needed to execute the program, and the third room is required for result printing. And to finish a job, the user/machine execute among the three rooms. To solve this problem, the batch processing came into existence.

In batch processing, we make a batch of similar kinds of jobs and then execute it.

So, there is no need of a programmer to run between the three different rooms many times.


Multiprogramming means executing multiple programs at the same time with the help of a single processor. In this, multiple processes can exist in the main memory simultaneously. In multiprogramming, the operating system chooses one of the jobs from the main memory, and execute it.

The below figure shows the multiprogramming system. There are five jobs present in the main memory and the CPU executes these jobs one after one.

If a system is non-multiprogramming, then at a time, only a single job is executed by the CPU. In a non-multiprogramming system, if there is any program that is waiting for the input/output device, then in this condition, the CPU becomes idle, and due to this, the CPU performance will get affected. But if we have a multiprogramming environment, then no Input/output will wait, and the CPU will never sit ideally. In a multi-programming environment, if there is any process that waits for an I/O, then the CPU will change the job and takes another job from the job pool so that the CPU will never sit ideally.

Advantages of Multiprogramming

The advantages of multiprogramming are:

  • In multiprogramming, the CPU will never sit ideal.
  • Multiprogramming provides effective memory utilization.
  • Throughput is an increase in multiprogramming.

Time-Sharing System

In a time- sharing system, several users can share the system simultaneously. The reason behind its name ‘time sharing’ is in this system, the time of the processors is shared among the number of users simultaneously. The Time-sharing system is a logical extension of a multiprogramming system. The major difference between the Time-sharing system and the Multiprogramming batch system is that the purpose of the time-sharing system is to reduce the response time, and the purpose of the Multiprogramming system is to maximize the use of a processor.

In the Time-sharing system, the CPU executes several jobs by switching between the jobs. The switching happens very frequently so that the response can instantly be received. In this type of system, with the help of the CPU scheduler, the job is chosen from the ready queue and executed. And when the time slot of the job is expired, then CPU switch another job.

Advantages of Time-Sharing System

The advantages of time-sharing system are:

  • The Time-sharing system offers the benefit of quick response.
  • The Time-sharing system minimizes the idle time of the CPU.
  • The Time-sharing system avoids the duplication of the software.
  • The Time-sharing system provides efficient utilization of CPU.

Disadvantages of Time-Sharing System

The disadvantages of the time-sharing system are:

  • In the Time-sharing system, there is a problem of reliability.
  • Data communication problem.

Parallel Processing System

In the parallel processing system, there are multiple processors, and, in this system, all the processors work concurrently. In this type of system, the job is divided into several sub-jobs, and then these sub-jobs are distributed among the processors that are present in the system. Parallel processing finishes the job in less time. This system is called a parallel processing system because, in this, multiple processors execute the job in a parallel manner.

Advantages of Parallel Processing System

The advantages of the parallel processing system are:

  • In Parallel processing, throughput is increased.
  • Multiple jobs are executed in less time.

Distributed System

Distributed systems are also known as loosely coupled systems. In a distributed system, two or more nodes are connected to each other, but the memory or a clock is not shared by the processors. With the help of communication lines like telephone lines or high-speed buses, the processors communicate with each other. In a distributed system, processors can be different in size and functions. These processors are called nodes, computers, sites, etc.

Advantages of Distributed System

The advantages of a Distributed system are:

  • With the help of the distributed system, load on the host computer can be reduced.
  • A Distributed system reduces the delay in the processing of data.
  • In a distributed system, the failure of one node will never affect the other node communication because each node is independent of each other.
  • It increases the speed of the data exchange through electronic mail.

Disadvantages of Distributed System

The disadvantages of a distributed system are:

  • In a distributed system, if the main network fails, the whole communication will be stopped.
  • The language which we are used to create distributed systems is not well defined.
  • Distributed systems are costly.

Real-Time Operating System

Real- time operating system is used when there is a rigid time requirement on the operation of the processors. It is a special-purpose operating system. In Real-Time operating system, it is must that the task will be finished in a definite time.

There are three kinds of the Real-Time operating system:

  1. Firm Real-time Operating System
  2. Hard Real-time Operating System
  3. Soft Real-time Operating System

Disadvantages of Real-Time Operating System

The disadvantages of the real-time operating system are:

  • In Real-Time operating system, there is less switching of tasks.
  • In Real-Time operating system, complicated algorithms are used that are tough to understand.