0% found this document useful (0 votes)
266 views3 pages

Difference Between Multitasking Multithreading and Multi20difference20between20multitasking20multithreading20and20multiprocessing

Multitasking refers to multiple tasks or processes sharing common computing resources like the CPU. Multithreading allows multiple threads within the same process to run concurrently by sharing resources. Multiprocessing uses multiple CPUs to run multiple processes in parallel to maximize resource usage and reduce processing time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
266 views3 pages

Difference Between Multitasking Multithreading and Multi20difference20between20multitasking20multithreading20and20multiprocessing

Multitasking refers to multiple tasks or processes sharing common computing resources like the CPU. Multithreading allows multiple threads within the same process to run concurrently by sharing resources. Multiprocessing uses multiple CPUs to run multiple processes in parallel to maximize resource usage and reduce processing time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 3

📖

4. Difference between
multitasking, multithreading
and multiprocessing
1. Multiprogramming – A computer running more than one program at a time
(like running Excel and Firefox simultaneously).

2. Multiprocessing – A computer using more than one CPU at a time.

3. Multitasking – Tasks sharing a common resource (like 1 CPU).

4. Multithreading is an extension of multitasking.

Multi Programming
In a non multi programmed system, As soon as one job leaves the CPU and goes for
some other task , the CPU becomes idle. The CPU keeps waiting and waiting until
this job (which was executing earlier) comes back and resumes its execution with
the CPU. So CPU remains free for all this while. So it has a drawback that CPU is
staying idle for all these while and also the other jobs are not getting chance to be
executed on CPU.

To avoid situations like this and come up with efficient utilization of CPU, the
concept of multi programming came up.

In a Multi programmed system, as job leaves the cpu for other task , the cpu picks a
job from job pool and start to execute the jobs and if these job goes for other task
then cpu the repeats the above process and then keep on executing the jobs. And
doesnt stay idle for long. As the job comes back from task , the cpu is again
allocated to it.

So the ultimate job of Multi Programming is to keep the OS busy , till their job to be
executed.

4. Difference between multitasking, multithreading and multiprocessing 1


Multiprocessing
In a Uniprocessor system, only single process is done at a time.

Multiprocessing refers to the ability of computer to use more than one Processor for
task. These multi processors shares the computer bus, clock, memory, peripheral
devices etc.

It is the ability of a system to leverage multiple processors computing power.

Working in Multiprocessing
In these, many processes can be run simultaneously. The process are run on each
core, hence on dual core processors the processes can be completed 2x faster, on
quad core 4x faster.

Why use it?

Main use is to save time by completing processes much faster. They can save
money as they share peripherals and power supplies.

Also for having reliability in system, if a processor fails and others keep
working, the systems will be only slower, it would not stop working all together.

Multiprocessing term is used for hardware not for Software.

Multitasking
Multitasking is the logical extension of Multiprogramming.

Multiprogramming works solely on the basis of the context switching, while


Multitasking works on the basis of context switching and time sharing.

Working

In time sharing system, the process are given fixed/specific quantum of time for
execution on cpu. After time expires, the processes are switched, here context
swicthing is happening but within a fixed time. The quantum of time provided is of
nano sec magnitude. As the each process gets switced so fast that the illusion is
created that the all process are executed at the same time by users end.
In Multitasking Time Sharing is best manifested because each running processes
takes only fair quantum of time.
In general sense, the multitasking is used to refer to multiple processes, threads,
programs, task running at the same time.

4. Difference between multitasking, multithreading and multiprocessing 2


In Modern OS, this term is used for multiple task sharing the same processing
resources.

For Multitasking, their should be Multiprogramming.

Multithreading
Thread is the basic unit of CPU Utilization.

Multithreading is an Execution Model that allows various code segments to run


concurrently within the context of same process.

It is the ability of a process to manage its use by number of users at a time and to
manage the multiple request by same users without having to make multiple copies.

Benefits

It increases the responsiveness of the programs. If one thread gets stuck or


crashes the rest of thread is still working normally and program stays
responsive.

It is less costly. Creating new copy of same process is time costly operation. so
multithreading saves time and also switching is simple between threads as they
share same resources of parent process.

4. Difference between multitasking, multithreading and multiprocessing 3

You might also like