Operating System

Time Sharing Operating System

Time Sharing Operating System

Time sharing operating system is a type of operating system. An operating system is basically, a program that acts as an interface between the system hardware and the user. Moreover, it handles all the interactions between the software and the hardware.

It allows the user to perform more than one task at a time, each task getting the same amount of time to execute. Hence, the name time sharing OS. Moreover, it is an extension of multiprogramming systems. In multiprogramming systems, the aim is to make the maximum use of the CPU. On the other hand, here the aim is to achieve the minimum response time of CPU.

Therefore, all the tasks will run smoothly on the system. Hence, its name is also multitasking operating system. Multiple jobs are running at the CPU time and also, they use the CPU simultaneously. But, the switching between the tasks is very fast due to which the user feels that all tasks are running at the same time.

Working of Time Sharing Operating System

The operating system performs time sharing through CPU scheduling and multiprogramming. Let us study closely the process in a time sharing system. It is as follows:

  • It is the division of CPU time for each process when more than one task are given by the user.
  • A short duration of time is chosen for each process. Moreover, this time duration is very small in the order of 10-100 milliseconds. This time duration is known as time slot, time slice, or quantum.
  • Suppose three processes namely, P1, P2, and P3 are running on the system. Now, suppose that the quantum is 4 nanoseconds (ns). Now, they will execute in the following manner.
  • Process P1 will execute for 4 ns, as soon a sit gets over, process p2 starts executing for a duration of 4 ns. Further, when p2 gets complete process P3 executes for 4ns. This process continues till all the processes gets complete.
  • In this way, only one process runs at a time but, the switching between the processes is very fast. Hence, the user feels that all the processes are running at the same time.
time sharing operating system

                                                                                                                          Time Sharing OS

The above diagram shows the working of a time sharing OS. In this diagram, process 4 is in the active state. Process 5 is in a ready state while, processes 1, 2, 3, and 6 are in a waiting state.

  • Active State: This is the state of the process which is currently processing on the CPU. Only, one process is in the active state at a time.
  • Ready State: In this state, the process is ready for execution but, it is waiting for its turn to use the CPU. More than one process can be in the ready state at a time.
  • Waiting State: In this state, the process is not ready for execution. It is waiting for some input/output process to get complete.

Browse more Topics under Operating System

Advantages of Time Sharing Operating System

  • Response time of CPU reduces.
  • Idle time of CPU reduces.
  • Each task/process gets an equal time slot to execute.

Disadvantages of Time Sharing Operating System

  • The data of each program should be secure so that they don’t mix.
  • Communication is very important to maintain. Lack of communication can affect the whole working.

Frequently Asked Questions (FAQs)

Q1. What is time sharing OS?

A1. Time sharing OS allows the user to perform more than one task at a time, each task getting the same amount of time to execute. Hence, the name time sharing OS. Multiple jobs are running at the CPU time and also, they use the CPU simultaneously. But, the switching between the tasks is very fast due to which the user feels that all tasks are running at the same time.

Q2. What is the other name for time sharing OS?

A2. Since all the tasks run smoothly on the system. Hence, its name is also multitasking operating system.

Q3. What is quantum?

A3. The short duration of time which is decided for each process in a time sharing OS is called quantum. We can also call it as time slot or time slice.

Q4. What are the advantages of time sharing operating system?

A4. The advantages of time sharing OS are as follows:

  • Response time of CPU reduces.
  • Idle time of CPU reduces.
  • Each task/process gets an equal time slot to execute.
Share with friends

Customize your course in 30 seconds

Which class are you in?
5th
6th
7th
8th
9th
10th
11th
12th
Get ready for all-new Live Classes!
Now learn Live with India's best teachers. Join courses with the best schedule and enjoy fun and interactive classes.
tutor
tutor
Ashhar Firdausi
IIT Roorkee
Biology
tutor
tutor
Dr. Nazma Shaik
VTU
Chemistry
tutor
tutor
Gaurav Tiwari
APJAKTU
Physics
Get Started

Leave a Reply

Your email address will not be published. Required fields are marked *

Download the App

Watch lectures, practise questions and take tests on the go.

Customize your course in 30 seconds

No thanks.