Difference Between Multitasking and Multithreading in OS

Operating SystemHardwareEmail

In this post, we will understand the difference between multitasking and multithreading in an operating system −

Multitasking

  • In this process, the users are allowed to perform multiple tasks by CPU.

  • It involves CPU switching between tasks.

  • The processes share separate memory locations.

  • It involves multiprocessing.

  • The CPU is provided to execute many tasks at a time.

  • The processes don’t share the same resources.

  • Every process is assigned its own resources.

  • It is slow in comparison to multithreading.

  • The process of termination takes more time.

This is how Multi-tasking looks like −

Multithreading

  • Multiple threads are created from a process.

  • Due to this, the power of computer is increased.

  • It involves CPU switching between the threads.

  • The processes are allocated same memory.

  • It doesn’t involve multiprocessing.

  • The CPU is provided so that multiple threads can be executed at a specific time.

  • Every process shares the same set of resources with each other.

  • It is fast.

  • The process of thread termination takes less time.

A multi-threaded process looks like the following −

raja
Published on 19-Apr-2021 06:23:11
Advertisements