Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Operating System  >  Process-Based & Thread-Based Multitasking

Process-Based & Thread-Based Multitasking | Operating System - Computer Science Engineering (CSE) PDF Download

Introduction

A multitasking operating system is an operating system that gives you the perception of 2 or more tasks/jobs/processes running at the same time. 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. Usually CPU processes only one task at a time but the switching is so fast that it looks like CPU is executing multiple processes at a time. 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.

Multitasking programming is of two types

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

1. Process Based Multitasking Programming

  • In process based multitasking two or more processes and programs can be run concurrently.
  • In process based multitasking a process or a program is the smallest unit.
  • Program is a bigger unit.
  • Process based multitasking requires more overhead.
  • Process requires its own address space.
  • Process to Process communication is expensive.
  • Here, it is unable to gain access over idle time of CPU.
  • It is comparatively heavy weight.
  • It has slower data rate multi-tasking.
    Example: We can listen to music and browse internet at the same time. The processes in this example are the music player and browser.

2. Thread Based Multitasking Programming

  • In thread based multitasking two or more threads can be run concurrently.
  • In thread based multitasking a thread is the smallest unit.
  • Thread is a smaller unit.
  • Thread based multitasking requires less overhead.
  • Threads share same address space.
  • Thread to Thread communication is not expensive.
  • It allows taking gain access over idle time taken by CPU.
  • It is comparatively light weight.
  • It has faster data rate multi-tasking.
    Examples: 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.
The document Process-Based & Thread-Based Multitasking | Operating System - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Operating System.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
10 videos|99 docs|33 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Process-Based & Thread-Based Multitasking - Operating System - Computer Science Engineering (CSE)

1. What is multitasking?
Ans. Multitasking refers to the ability of an operating system to execute multiple tasks or processes simultaneously.
2. What is process-based multitasking?
Ans. Process-based multitasking involves the execution of multiple independent programs or processes concurrently, where each process has its own memory space.
3. What is thread-based multitasking?
Ans. Thread-based multitasking involves the concurrent execution of multiple threads within a single process. Threads share the same memory space and resources of the process.
4. How does process-based multitasking work?
Ans. In process-based multitasking, the operating system allocates resources and time slices to each process, allowing them to execute in parallel. The CPU switches between processes, giving the illusion of simultaneous execution.
5. How does thread-based multitasking differ from process-based multitasking?
Ans. In thread-based multitasking, threads within a process can share resources and communicate with each other more efficiently compared to independent processes in process-based multitasking. This results in lower overhead and improved performance.
10 videos|99 docs|33 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Process-Based & Thread-Based Multitasking | Operating System - Computer Science Engineering (CSE)

,

past year papers

,

Exam

,

ppt

,

video lectures

,

Semester Notes

,

Viva Questions

,

Previous Year Questions with Solutions

,

shortcuts and tricks

,

Free

,

pdf

,

Summary

,

study material

,

mock tests for examination

,

Process-Based & Thread-Based Multitasking | Operating System - Computer Science Engineering (CSE)

,

Objective type Questions

,

Extra Questions

,

Process-Based & Thread-Based Multitasking | Operating System - Computer Science Engineering (CSE)

,

Sample Paper

,

Important questions

,

MCQs

,

practice quizzes

;