Open In App

Difference between Multiprogramming, multitasking, multithreading and multiprocessing

  1. Multiprogramming – Multiprogramming is known as keeping multiple programs in the main memory at the same time ready for execution.
  2. Multiprocessing – A computer using more than one CPU at a time.
  3. Multitasking – Multitasking is nothing but multiprogramming with a Round-robin scheduling algorithm.
  4. Multithreading is an extension of multitasking.
Feature Multiprogramming Multitasking Multithreading Multiprocessing
Definition Running multiple programs on a single CPU Running multiple tasks (applications) on a single CPU Running multiple threads within a single task (application) Running multiple processes on multiple CPUs (or cores)
Resource Sharing Resources (CPU, memory) are shared among programs Resources (CPU, memory) are shared among tasks Resources (CPU, memory) are shared among threads Each process has its own set of resources (CPU, memory)
Scheduling Uses round-robin or priority-based scheduling to allocate CPU time to programs Uses priority-based or time-slicing scheduling to allocate CPU time to tasks Uses priority-based or time-slicing scheduling to allocate CPU time to threads Each process can have its own scheduling algorithm
Memory Management Each program has its own memory space Each task has its own memory space Threads share memory space within a task Each process has its own memory space
Context Switching Requires a context switch to switch between programs Requires a context switch to switch between tasks Requires a context switch to switch between threads Requires a context switch to switch between processes
Inter-Process Communication (IPC) Uses message passing or shared memory for IPC Uses message passing or shared memory for IPC Uses thread synchronization mechanisms (e.g., locks, semaphores) for IPC Uses inter-process communication mechanisms (e.g., pipes, sockets) for IPC

1. Multi programming –

In a modern computing system, there are usually several concurrent application processes which want to execute. Now it is the responsibility of the Operating System to manage all the processes effectively and efficiently. One of the most important aspects of an Operating System is to multi program. In a computer system, there are multiple processes waiting to be executed, i.e. they are waiting when the CPU will be allocated to them and they begin their execution. These processes are also known as jobs. Now the main memory is too small to accommodate all of these processes or jobs into it. Thus, these processes are initially kept in an area called job pool. This job pool consists of all those processes awaiting allocation of main memory and CPU. CPU selects one job out of all these waiting jobs, brings it from the job pool to main memory and starts executing it. The processor executes one job until it is interrupted by some external factor or it goes for an I/O task. Non-multi programmed system’s working –

The main idea of multi programming is to maximize the CPU time. Multi programmed system’s working –



In the image below, program A runs for some time and then goes to waiting state. In the mean time program B begins its execution. So the CPU does not waste its resources and gives program B an opportunity to run. 



2. Multiprocessing –

In a uni-processor system, only one process executes at a time. Multiprocessing is the use of two or more CPUs (processors) within a single Computer system. The term also refers to the ability of a system to support more than one processor within a single computer system. Now since there are multiple processors available, multiple processes can be executed at a time. These multi-processors share the computer bus, sometimes the clock, memory and peripheral devices also. Multi processing system’s working –

Why use multi processing –

Multiprocessing refers to the hardware (i.e., the CPU units) rather than the software (i.e., running processes). If the underlying hardware provides more than one processor then that is multiprocessing. It is the ability of the system to leverage multiple processors’ computing power. Difference between Multi programming and Multi processing –

3. Multitasking –

As the name itself suggests, multitasking refers to execution of multiple tasks (say processes, programs, threads etc.) at a time. In the modern operating systems, we are able to play MP3 music, edit documents in Microsoft Word, surf the Google Chrome all simultaneously, this is accomplished by means of multi tasking. Multitasking is a logical extension of multi programming. The major way in which multitasking differs from multi programming is that multi programming works solely on the concept of context switching whereas multitasking is based on time sharing alongside the concept of context switching. Multi tasking system’s working –

In a more general sense, multitasking refers to having multiple programs, processes, tasks, threads running at the same time. This term is used in modern operating systems when multiple tasks share a common processing resource (e.g., CPU and Memory). 

4. Multi threading –

A thread is a basic unit of CPU utilization. Multi-threading is an execution model that allows a single process to have multiple code segments (i.e., threads) running concurrently within the “context” of that process. e.g. VLC media player, where one thread is used for opening the VLC media player, one thread for playing a particular song and another thread for adding new songs to the playlist. Multi threading is the ability of a process to manage its use by more than one user at a time and to manage multiple requests by the same user without having to have multiple copies of the program. Multi threading system’s working – Example 1 –

Example 2 –

The image below completely describes the VLC player example:  

Advantages of Multi threading –


Article Tags :