Uni-programming vs Multi Programming vs Time Sharing

To understand the difference between Uni-programming vs Multi Programming vs Time Sharing systems, let’s study them one at a time

Uni-programming – In uni-programming system jobs are submitted one by one to the system. From within the batch, the jobs are processed one by one. A collection of jobs forms a batch (batch processing) from which the jobs are executed one by one. Every user submits his/her job to the operator who forms a batch of jobs. The entire system is used by one process at a time. The sequence of steps is as follows:

  1. All users submit the jobs to the operator ( the one who manages the system)
  2. The operator selects similar kinds of jobs and makes batches.
  3. Job1 from batch 1 is submitted for processing.
  4. Job1 uses the CPU and I/O till it is completed. Till this time no other process can use the CPU.
  5. After job1 finishes job 2 is loaded into the memory.
uniprogramming system

Go through the below presentation which depicts the working of one of the batch. Note that the CPU time is wasted while the job is doing I/O.

Disadvantages of batch processing/uni-programming:
  1. Wastage of CPU time
  2. No user interaction
  3. No mechanism to prioritize processes

Video Link

uni programming vs multi programming vs time sharing

Multi-Programming Systems

In multi-programming more than one process can reside in the main memory at a time. Thus, when process P1 goes for I/O operation the CPU is not kept waiting and is allocated to some another process (lets say P2). This keeps the CPU busy at all times.

uni-programming vs multi programming

The presentation below shows the working of a multi programming OS

  1. CPU is being utilized all the time as long as there are more than 1 process
  2. The processes can be finished in less amount of time

1. No user interaction

Time Sharing (multi tasking) systems

The concept of time sharing overcomes the problem of no user interaction as faced in the above two strategies. Time sharing is the logical extension of multi programing. In time sharing multiple jobs are executes at the same time and the CPU switches among them so frequently that each user can interact with each program while it is running. Time sharing system requires that each user be provided with input device (keyboard or mouse) and an output device (monitor) to interact with the system. This decreases the response time of the system for each user process. This gives each user the illusion that the CPU is working solely for him/her.

uni-programming vs multi programming vs time sharing system

The presentation below tries to depict such a situation. Think of the processes from three different users. The CPU shifts between at regular intervals of time. While the CPU is with one of the process, the other users can interact with their process by doing some I/O.

  1. User interaction is possible
  2. Multi-programming is possible

Summarizing Uni-programming vs Multi programming vs Time Sharing

Uni-ProgrammingMulti ProgrammingTime Sharing
1. No user interaction1. No user interaction1. User interaction possible
2. Only one process uses the entire system resources at any given time2. Multiple process can use system resources at same time2. Multiple process can use system resources at same time
3. Less CPU utilization3. More CPU utilization3. More CPU utilization

Previous                                                   Next
Introduction to Operating System     Operating system functions and services

Leave a Reply

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