Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Process-Based and Thread-Based Multitasking
Next article icon

Process-Based and Thread-Based Multitasking

Last Updated : 09 Nov, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

Multitasking operating system is an operating system that gives you the perception of two or more tasks/jobs/processes running simultaneously. It does this by dividing system resources amongst these tasks/jobs/processes and switching between the tasks/jobs/processes while they are executing over and over again. The CPU processes only one task at a time, but in Multitasking the switching is so fast that it looks like the CPU is executing multiple processes simultaneously. They can support either preemptive multitasking, where the OS doles out time to applications (virtually all modern OSes) or cooperative multitasking, where the OS waits for the program to give back control (Windows 3.x, Mac OS 9 and earlier), leading to hangs and crashes. Also known as Timesharing, multitasking is a logical extension of multiprogramming. 

Prerequisite: Thread, Difference between multitasking, multithreading and multiprocessing 

Multitasking Programming has Two Types: 

  1. Process-based Multitasking
  2. Thread-based Multitasking

Process-Based Multitasking

Thread-Based Multitasking

In process-based multitasking, two or more processes and programs can be run concurrently.In thread-based multitasking, two or more threads can be run concurrently.
In process-based multitasking, a process or a program is the smallest unit.In thread-based multitasking, a thread is the smallest unit.
The program is a bigger unit.Thread is a smaller unit.
Process-based multitasking requires more overhead.Thread-based multitasking requires less overhead.
The process requires its own address space.Threads share the same address space.
The process to Process communication is expensive.Thread to Thread communication is not expensive.
Here, it is unable to gain access over the idle time of the CPU.It allows taking gain access over idle time taken by the CPU.
It is a comparatively heavyweight.It is comparatively lightweight.
It has a faster data rate for multi-tasking because two or more processes/programs can be run simultaneously.It has a comparatively slower data rate multi-tasking.
Example: We can listen to music and browse the internet at the same time. The processes in this example are the music player and browser. Example: Using a browser we can navigate through the webpage and at the same time download a file. In this example, navigation is one thread, and downloading is another thread. Also in a word-processing application like MS Word, we can type text in one thread, and spell checker checks for mistakes in another thread. 

Next Article
Process-Based and Thread-Based Multitasking

A

Anshika Goyal
Improve
Article Tags :
  • Misc
  • Technical Scripter
  • Operating Systems
  • Difference Between
  • GATE CS
Practice Tags :
  • Misc

Similar Reads

    Multi Threading Models in Process Management
    Multi threading- It is a process of multiple threads executes at same time. There are two main threading models in process management: user-level threads and kernel-level threads. User-level threads: In this model, the operating system does not directly support threads. Instead, threads are managed
    6 min read
    Difference between Process and Thread
    Process and threads are the basic components in OS. Process is a program under execution whereas a thread is part of process. Threads allows a program to perform multiple tasks simultaneously, like downloading a file while you browse a website or running animations while processing user input. A pro
    7 min read
    Difference between Multi-tasking and Multi-threading
    Multi-tasking is the ability of an operating system to run multiple processes or tasks concurrently, sharing the same processor and other resources. In multitasking, the operating system divides the CPU time between multiple tasks, allowing them to execute simultaneously. Each task is assigned a tim
    6 min read
    Difference between Multiprocessing and Multithreading
    Multiprocessing uses multiple CPUs to run many processes at a time while multithreading creates multiple threads within a single process to get faster and more efficient task execution. Both Multiprocessing and Multithreading are used to increase the computing power of a system in different ways. In
    3 min read
    Difference between Preemptive and Cooperative Multitasking
    Multitasking is one of the key features of present-day operating systems, by which many tasks or processes can be processed in parallel. It also improves throughput by controlling how activities can access the CPU. There are two main categories of multitasking: preemptive multitasking and cooperativ
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences