0% found this document useful (0 votes)
29 views

Flip Class: Task Process Multiprocessing Multitasking

The document discusses key concepts related to processes, multiprocessing, and multitasking. It defines a process as a program in execution that includes components like the program counter, stack, and data section. It describes process states like running, waiting, ready, and terminated. Multiprocessing is defined as using multiple CPUs to execute multiple processes concurrently, while multitasking creates the illusion of executing multiple tasks at once by rapidly switching between them on a single CPU. The document also compares and contrasts multiprocessing and multitasking.

Uploaded by

SAKSHI RAINA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Flip Class: Task Process Multiprocessing Multitasking

The document discusses key concepts related to processes, multiprocessing, and multitasking. It defines a process as a program in execution that includes components like the program counter, stack, and data section. It describes process states like running, waiting, ready, and terminated. Multiprocessing is defined as using multiple CPUs to execute multiple processes concurrently, while multitasking creates the illusion of executing multiple tasks at once by rapidly switching between them on a single CPU. The document also compares and contrasts multiprocessing and multitasking.

Uploaded by

SAKSHI RAINA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

TEAM-D

FLIP CLASS
(MODULE-5)

• TASK
• PROCESS
• MULTIPROCESSING
• MULTITASKING
CONTENT:
• Task
• Process
• Process Structure
• Process states and its transitions
• Process Management
• Multiprocessing
• Multitasking
• Multitasking VS Multiprocessing
• Types of Multitasking
TASK & PROCESS
•Task- The job/activity, and associated goals, that user whishes to accomplish while
using the interface.

•An operating system executes a variety of programs:


•Batch system – jobs
•Time-shared systems – user programs or tasks

•Textbook uses the terms job and process almost interchangeably.

•Process
•a program in execution.
•process execution must progress in sequential fashion.

•A process includes:
•program counter
•stack
•data section
PROCESS STRUCTURE

Execution of process follows concurrent


execution methodology (pseudo parallelism).

A process allocates different kinds of registers for


itself
Stack & working registers – holds local
variable.
Status register – contains information about the
state of the processor.
Program counter – points to the next executable
instruction
MEMORY ORGANIZATION
A process mimics a processor in properties
and inherits them thus it is considered as a
virtual processor.

Memory organization of a process consists


of three types of memories:
Stack memory – holds all temporary data
such as variables local to the process.
Data memory – holds all the global data
for the process.
Code memory – holds the program code
corresponding to the process.
PROCESS STATES AND ITS TRANSITION

• In a multitasking computer system, processes may occupy a variety of


states and each process is defined in part by the current activities of that
process.
• As a process executes, its changes states.
• The cycle though which a process changes its state from newly state to
terminated state is known as process life cycle.
THE VARIOUS STATES ASSOCIATED WITH A
PROCESS ARE:
• New State-The state at which a process is created is referred as ‘New State’.
• Running State -The state where in the source code instructions corresponding to the
process is being executed is called ‘Running State’. Running state is the state at
which the process execution happens.
• Waiting State -Wait State refers to a state where a running process is temporarily
suspended from execution and does not have an immediate access to resources.
• Ready State -The state, where a process is incepted into the memory and awaiting
the processor time for execution, is known as ‘Ready State’.
• Terminated State -A state where the process completes its execution is known as
‘Terminated State’.
ATM (AID TO MEMORY)
PROCESS MANAGEMENT

• Process management deals with :


i) Creation of a process.
ii) Setting up the memory space for the process.
iii)Loading the process’s code into the memory space.
iv)Allocating system resources.
v) Setting up a Process Control Block ( PCB) for the process and process
termination/deletion.
MULTIPROCESSING

• What is multiprocessing ?
• The use of two or more CPU’s within a single system.
• It can be termed as execution of multiple concurrent
processes, with each running on a separate CPU or core. It
is a true parallel execution of multiple processes.
• Processor symmetry or Symmetrical Multiprocessing:
• A multiprocessor computer hardware & software
architecture where two or more identical processors are
connected to a single, shared main memory.
MULTITASKING
• Multitasking, in an operating system, is allowing a user to perform more than one computer
task at a time.
• Multitasking creates the illusion of multiple tasks executing in parallel. Multitasking
involves the switching of CPU from executing one task to another.
• Multitasking is a logical extension of multiprogramming system that supports multiple
programs to run concurrently
• In multitasking more than one task are executed at the same time. In this technique the
multiple tasks, also known as processes, share common processing resources such as a CPU
• This also leads to efficient utilization of the CPU time and is essential for many embedded
applications where processors are limited in computing speed due to cost, power, silicon
area and other constraints.
CONTEXT SWITCHING
• When CPU switches to another process, the system must save the state of the old process
and load the saved state for the new process via a context switch.

• Context of a process represented in the PCB.

• Context-switch time is overhead; the system does no useful work while switching.

• The more complex the OS and the PCB -> longer the context switch

• Time dependent on hardware support.

• Some hardware provides multiple sets of registers per CPU -> multiple contexts loaded at
once
STEPS INVOLVED
MULTITASKING VS MULTIPROCESSING

• Execution of more than one task • True parallel execution of multiple


simultaneously. processes using more than one processor.

• No. of CPU is one. • No. of CPU is more than one.


• It takes moderate amount of time. • It takes less time for job processing.
• More than one job can be executed at a
• One by one job is executed at a time. time.
• Economical. • Economical
• Moderate Throughput. • Maximum Throughput.
• Moderate Efficiency. • Maximum Efficiency
OVERVIEW
TYPES OF MULTITASKING

• Co-operative Multitasking:
• Each program can control the CPU for as long as it needs.

• Pre-emptive Multitasking:
• The operating system parcels out CPU time slices to each program.

• Non Pre-emptive Multitasking:


• The process/task, which is currently given the CPU time, is allowed to execute until it
terminates (enters the ‘Completed’ state) or enters the ‘Blocked/Wait’ state, waiting for an
I/O or system resource.
TEAM MEMBERS:
-SAKSHI RAINA
-RAJNEESH KHARE
-SRISHTI SAROJ
-RAUNAK ADITYA THANK YOU
-SUTIKSH ARYAN
-SHREYANSH TRIPATHI
-SHANTANU HADA
-SRINIVAS

You might also like