0% found this document useful (0 votes)
82 views2 pages

Multitasking Operating System - Animation - Simple Example - Easy Explanation

Multitasking operating systems allow users to perform more than one task at a time by quickly switching between processes. Processes are assigned a time quantum, such as 6 nanoseconds, to execute before the CPU switches to another process. This fast switching makes it feel like processes are running simultaneously to users. For example, a teacher may ask each student two questions before moving to the next student, similar to how a multitasking OS executes each process for a time quantum before switching to the next.

Uploaded by

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

Multitasking Operating System - Animation - Simple Example - Easy Explanation

Multitasking operating systems allow users to perform more than one task at a time by quickly switching between processes. Processes are assigned a time quantum, such as 6 nanoseconds, to execute before the CPU switches to another process. This fast switching makes it feel like processes are running simultaneously to users. For example, a teacher may ask each student two questions before moving to the next student, similar to how a multitasking OS executes each process for a time quantum before switching to the next.

Uploaded by

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

Multitasking Operating System | Animation | Simple Example | Easy

Explanation
Multitasking operating system is the logical extension of multi programming
multitasking is based on same concept of multi programming but with some
improvements.

Multitasking Operating System


Multitasking is an operating system which allows user to perform more than one
computer task that can be a program or a process or a threat at a time multitasking is also
called time sharing operating system.

Simplify definition
When you are using multiple programs all these programs or processes are loaded into
the main memory.

now processes are assigned specific quantum of time let's say time quantum is 6
nanoseconds so CPU will execute first process for 6 nanoseconds then move to next
process which also will be executed for 6 nanoseconds then the third one and so on after
the last one again the first will be executed for 6 nanoseconds.

Time Quantum
 time quantum is the period of time for which a process is allowed to run.

The multitasking operating system does the switching so fast that it feels like all
processes are running parallel and because it is so fast we users are able to work on
multiple programs conveniently.

Example
Consider you are a school teacher and you have to take oral examination of students by
asking them four questions each you decide that I will ask each student only two
questions at a time you start with the first student ask him two questions there are two
more questions left but you move to the second student ask the second student two
questions and move on to the third again ask the third student two questions and move
forward you go on to the last student and ask two questions now again start with the first
student ask him third and fourth question as you have decided that two questions at a
time you move to second student and ask third and fourth then move on to third and go
on to the last one now each student's questions are completed same as this teacher takes
oral exam of students multitasking OS executes processes using specific time quantum.

How does it works?


let's say there are three processes having particular time required for
execution and five nanoseconds of time quantum is defined operating system assigns

I. first process to the CPU CPU executes the process for five nanoseconds and stops
execution for process one

II. now process one has ten nanoseconds of execution left then the operating system
assigns second process to the CPU CPU executes sit for five nanoseconds and
stops execution

III. now the process to has five nanoseconds of execution left then the operating
system assigns third process to the CPU CPU execute sit for five nanoseconds
and stops execution

IV. now the process three has 15 nanoseconds of execution left then the operating
system again assigns first process to the CPU CPU execute sit for five
nanoseconds and stops execution

V. now the process one has five nanoseconds of execution left then the operating
system assigns second process to the CPU CPU executes sit for five nanoseconds
and stops execution

VI. now the process two has completed its execution as it was executed for ten
nanoseconds now it will be removed from the memory then the operating system
assigns their process
VII. to the CPU CPU execute sit for five nanoseconds and stops execution

VIII. now the process three has ten nanoseconds of execution left then the operating
system again assigns first process to the CPU CPU execute sit for five
nanoseconds and stops execution

IX. now the process one completes its execution completely forc15 nanoseconds now
it will be removed from the memory then the operating system assigns third
process to the CPU
X. CPU execute sit for five nanoseconds and stops execution

XI. now the process three has five nanoseconds of execution left then the operating
system again assigns third process to the CPU as no other process is present in
memory CPU execute sit for 5 nanoseconds and stops execution

XII. now the process 3 also completes at execution which was of 20 nanoseconds and
it will also get removed from the memory

this is how processes are executed in the multitasking ortime-sharing operating system it
is different from multi programming operating.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy