Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is a Multitasking Operating System?
3.
Why Multitasking Operating System?
4.
Types of Multitasking Operating Systems
4.1.
Preemptive Multitasking
4.2.
Non-Preemptive or Cooperative Multitasking
4.3.
True Multitasking
4.4.
Single-User Multitasking Operating System
5.
How does a Multitasking Operating System work?
6.
Characteristics of Multitasking Operating System
7.
Advantages of Multitasking in Operating System
8.
Disadvantages of Multitasking in Operating System
9.
Frequently Asked Questions
9.1.
What are the examples of multitasking operating systems?
9.2.
Is Windows 7 a multitasking operating system?
9.3.
What is the function of multitasking in the operating system?
9.4.
What is the difference between multitasking and multiprogramming?
9.5.
How is preemptive multitasking used in a computer system?
10.
Conclusion
10.1.
Recommended Reading
Last Updated: Mar 27, 2024
Easy

Multitasking Operating System

gp-icon
Operating system track
Free guided path
14 chapters
83+ problems
gp-badge
Earn badges and level up

Introduction

A multiprogramming system's logical extension is multitasking. It is a preemptive type where once the resources are allocated to the process for a limited time and then deallocated, and if the process still has CPU resources, it is returned to the queue. We can play music, write in Microsoft Word, use Google Chrome, and many other things at the same time on modern operating systems. Multitasking is used to achieve this. Multitasking in the operating system allows us to perform multiple computer tasks simultaneously. 

This article will help us learn about multitasking in operating systems and how helpful it is. 

So, let’s get started.  

multitasking operating system

What is a Multitasking Operating System?

Multitasking in operating system is an extension of systems based on multiprogramming. Multitasking in OS allows users to execute more than one program at the same time. Multitasking in the operating system will enable you to execute multiple programs with different tasks to run simultaneously. In this, the resources like CPU are shared between these processes that are running; the operating system plays a vital role by keeping track of which functionalities of these processes are running so that the transition between these processes can be done without any data loss. 

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Why Multitasking Operating System?

Multitasking Operating Systems enable a single processor to perform multiple tasks simultaneously. Since multiple tasks are concurrently running at the same time, it makes the computer far more efficient and productive as well.

The computer would have to wait for one process to be completed before it would start the second one. This one-by-one method would lead to the processor being slow and inefficient performance. With the help of a Multitasking Operating System, this problem is resolved within seconds, and the users can switch between tasks anytime.

In addition, a Multitasking Operating System makes better management of the system resources like CPU consumption and memory storage possible.

Types of Multitasking Operating Systems

Multitasking Operating System are of three types:

  1. Preemptive Multitasking
  2. Cooperative Multitasking
  3. True Multitasking
     

Now, let's discuss these types in detail.

Types of Multitasking Operating Systems

Preemptive Multitasking

It is a particular type of task assigned to the operating system. It helps decide the amount of time one task will spend until the operating system controls are given to another task.

This type of multitasking in Operating System is referred to as preemptive multitasking because this complete process is controlled by the operating system.

Desktop operating systems contain preemptive multitasking. The first operations system that used the method of Multitasking was Unix. Even Windows has used preemptive multitasking in the first versions of Windows 95 and Windows NT.

Also, Macintosh used proactive Multitasking in OS X. This operating system has the functionality of notification as soon as one process is completed, and the CPU can be provided to another program for execution.

Non-Preemptive or Cooperative Multitasking

Cooperative Multitasking in operating system can also be called Non-Preemptive Multitasking. This multitasking is called cooperative because its main objective is to release the CPU for another task while the present task is still running. This task is done by using taskYIELD() method. As soon as the function "taskYIELD" is invoked, the execution of the context switch is initiated.

macOS and Windows use cooperative Multitasking. As soon as some short unit of work is done, the windows program responds to a message and then hands over the CPU to another task until the program receives any other message. This method worked effectively for all the programs that are executing are developed by keeping other programs in mind and also if they are free of bugs.

True Multitasking

In a  Multitasking Operating System, True Multitasking is known as the ability of the operating system to perform and process multiple tasks at the same time. As the name suggests, it is the true form of multitasking. All of the modern processors and operating systems support True Multitasking.

Single-User Multitasking Operating System

It is a type of operating system that allows a single user to perform more than one task at a time is called Single-User Multitasking Operating System. For example Microsoft Windows and Macintosh OS.

How does a Multitasking Operating System work?

A Multitasking Operating System works by efficiently managing and sharing available resources, like CPU, memory, and input/output devices, among multiple tasks. It quickly switches between these tasks, making it seem like everything is happening simultaneously. When a task waits for input or encounters a delay, the operating system changes to another task, using idle CPU time and maximizing overall system productivity. This allows to run multiple applications simultaneously, making the system respond faster and work better.

Characteristics of Multitasking Operating System

Here are some characteristics of a Multitask Operating System-

  • Hardware Interruption: This means that the operating system receives messages indicating that a hardware peripheral requires attention due to failure or any other cause. This message will interrupt the ongoing process of resolving its problem.
     
  • Time-Sharing: This means that the computer can promptly switch users and their requirements. 
     
  • Context Switch: The operating system completes one job fully and then does another.
     
  • Real-time: Multitasking Operating Systems permit real-time computing system configuration. This means that several external tasks that require control by a singular processor. 
     
  • Multithreading: This means that one process accumulates input data, one process operates the input data, and one process writes results on the disk. Multithreading exchanges data between each other to share the total memory space.
     
  • Memory Swapping: Memory swapping is an arrangement that maintains a portion of primary memory in secondary storage whilst allowing for more memory than is physically available on the system. 
     

Advantages of Multitasking in Operating System

  1. Multiple applications can efficiently without interfering with the performance of the CPU, which is why it is suitable for numerous users that are working simultaneously.
     
  2. Multitasking operating systems have the best virtual memory system. Any program does not require a long wait time to perform its tasks because of virtual memory; if this problem arises, those applications are shifted to virtual memory.
     
  3. To avoid waiting for the CPU, all jobs are given a set length of time.
     
  4. A multitasking operating system can manage I/O devices, RAM, hard disc, CPU, and other computer resources.
     
  5. Users can run multiple programs simultaneously, such as an internet browser, games, Microsoft Excel, PowerPoint, and other utilities.

Disadvantages of Multitasking in Operating System

  1. Because of the modest pace of its processors, the system may run applications slowly, and their reaction time may increase when processing many programs. More processing power is required to fix this issue.
     
  2. The computer's performance may get slow due to the multiple programs running simultaneously because the main memory gets overloaded while loading numerous programs. Reaction time increases because the CPU cannot give various times for each program. The fact that it employs low-capacity RAM is the root of the problem. As a result, the RAM capacity can be raised to provide a solution.
     
  3. The multiple processors are busier at the same time to complete any task in a multitasking environment, so the CPU generates more heat.


You can also read about layered structure of operating system.

Frequently Asked Questions

What are the examples of multitasking operating systems?

Microsoft Windows 2000, IBM's OS/390, and Linux are examples of operating systems that can do multitasking (almost all of today's operating systems can). When you open any Web browser and then open Word simultaneously, you are causing the operating system to multitask.

Is Windows 7 a multitasking operating system?

Yes, Windows 7 is a multitasking operating system, allowing users to run multiple programs simultaneously. It supports preemptive multitasking, enabling efficient resource management and allocation among various applications running on the system.

What is the function of multitasking in the operating system?

Multitasking is used to keep all computer resources at maximum efficiency for as much of the time as possible. This is controlled by the operating system, which loads programs into the computer for processing and oversees their execution until they are finished.

What is the difference between multitasking and multiprogramming?

In multiprogramming, multiple programs execute simultaneously on a single device. In multitasking, a single resource is used to process various tasks.

How is preemptive multitasking used in a computer system?

Preemptive multitasking is a type of multitasking in which a computer uses some criteria used by the operating system to decide how long or the amount of time to allocate to any task before giving another task the control to use the operating system. When the operating system's controls are taken from one task and given to another, it is called preempting.

Conclusion

In this article, we have studied multitasking operating systems. We have also discussed the types of multitasking operating systems with their advantages and disadvantages.

We hope that this article has provided you with the help to enhance your knowledge regarding multitasking operating systems and if you would like to learn more, check out our articles on segmentation vs paging, and inverted paging.

Recommended Reading

Refer to our Guided Paths on Coding Ninjas Studio to learn more about Data Structure and AlgorithmsCompetitive ProgrammingJavaScriptSystem Design, etc. You can also consider our Operating System Course to give your career an edge over others.

Merry Learning!

Previous article
Multiprogramming Operating System
Next article
Multitasking Operating System
Guided path
Free
gridgp-icon
Operating system track
14 chapters
83+ Problems
gp-badge
Earn badges and level up
Live masterclass