You are on page 1of 12

Multiprogramming System vs.

Multitasking System
By
Assad H. Thary Al-Ghrairi
Overview
 Multiprogramming: Running multiple programs
“at the same time”
 Requires multiplexing (sharing) the CPU

Firefox Word C# Firefox E-mail

time

 Transfer of control is called a context switch


 In a multiprogramming system there are
one or more programs loaded in main
memory which are ready to execute. Only
one program at a time is able to get the
CPU for executing its instructions (i.e.,
there is at most one process running on
the system) while all the others are waiting
their turn.
 The main idea of multiprogramming is to
maximize the use of CPU time. 
Requirements of Multiprogramming
 Process Switching possibility: the system must
be able to safely switch from one process to
another. This is called Context switching.
 Direct Memory Access: I/O processors must be
able to directly access main memory without
interference and conflictions.
 The Interrupt System: I/O processors and
monitoring devices must be able to safely
communicate with the CPU.
Multitasking System
 Multitasking is the ability of an operating system
to execute more than one task simultaneously
on a single processor machine. Though we say
so but in reality no two tasks on a single
processor machine can be executed at the same
time. Actually CPU switches from one task to the
next task so quickly that appears as if all the
tasks are executing at the same time. More than
one task/program/job/process can reside into
the same CPU at one point of time.
 The operating system will switch between tasks
based on the tasks current states and their
requirements and priorities.
 Multitasking has the same meaning of
multiprogramming but in a more general
sense.
 Multitasking is only possible when
multiprogramming is the fundamental
capability of simultaneously executing
pieces of software.
 Most modern operating systems, like
UNIX, Linux, and Windows, support
multitasking.
Advantages of Multitasking
 To the user, the advantage of multitasking is the
ability to have several applications open and
working at the same time. For example, a user
can edit a file with one application while another
application is recalculating a spreadsheet.
 To the application developer, the advantage of
multitasking is the ability to create applications
that use more than one process and to create
processes that use more than one thread of
execution.
Disadvantages of Multitasking
 For a new user, multitasking would possibly give
off a sense of confusion.
 Due to several programs that the computer
needs to process, there is a high tendency that
computer performance would be affected. It
might encounter buffering and processing speed
may slow down
Summary
 Multitasking vs. multiprogramming both are same
because both use single processor but the only
difference is that in multiprogramming more than one
job can reside in main memory and on the other hand
in multitasking CPU switches so quickly among jobs
that it seems all are in memory but CPU just switches
only one job can reside in main memory.
 In multi-programming OS , OS switches the CPU
from one process to another process.
that switching is called the context switching. While,
in multi-tasking , switching is done according to the
users.
Thank you!

You might also like