You are on page 1of 14

Multitasking Operating System

-Task means a process. A process means a program in execution. A CPU


handling multiple tasks at a time is known as multitasking. A multitasking
operating system can handle multiple tasks together by applying
multiprogramming technique.
-An instance of a program in execution is called a process or a task. Multitasking
operating system supports two or more active processes simultaneously.
-A multi process operating system is also called multitasking operating system.
Multitasking is the ability to support two or more active processes
simultaneously In multitasking, only one CPU is involved, but it switches from
one program to another so quickly that it gives the appearance of executing all
of the programs at the same time The term multiprogramming denotes an
operating system which in addition to support multiple concurrent processes
allows the instructions and data from two or more disjoint processes to reside
in primary memory simultaneously,
• Note that multiprogramming implies multi process operation, but multi-
process operation (or)multitasking) does not imply multiprogramming In
effect the multi-process operation is one of the mechanisms that a
multiprogramming operating system employs in managing the totality of
computer system resources, including the CPU, memory and I/O devices.
• Multi-access or Multi user operating systems allow simultaneous access to a
computer system by some dedicated transaction processing systems to
hundreds of active terminals under control of a single program.Multitasking
is, on single processor machines, implemented by letting the running
process own the CPU for a while (a time slice) and when required gets
replaced with another process, which then owns the CPU. The two most
common methods for sharing the CPU time is either cooperative
multitasking or preemptive multitasking.
1. Cooperative Multitasking. The simplest form of multitasking is cooperative
multitasking. It lets the programs decide when they wish to let other tasks
run. This method is not good since it lets one process monopolise the CPU
and never let other processes run. This way a program may be reluctant to
give away processing power in the fear of another process hogging all CPU
time. Early versions of the MacOS (uptil MacOS 8) and versions of Windows
earlier than Wings/WinNT used cooperative multitasking (Win95 when
running old apps)
2. Preemptive Multitasking: Preemptive multitasking moves the control of the
CPU to the OS. letting each process run for a given amount of time (a time
slice) and then switching to another task. This method prevents one process
from taking complete control of the system and thereby making it seem as if
it is crashed. This method is most common today, implemented by among
others 08/2, Win95/98, WinNT. Unix, Linux, Beos, QNX, OS9 and most
mainframe Os The assignment of CPU time is taken care of by the scheduler
Fig. 1.8 shows multitasking concept. The user gives instructions to the
operating system or to a program directly, and receives an immediate
response. Operating system handles multitasking in the way that it can
handle multiple operations/executes multiple programs at a time.
Word

Operating CPU
E-mail
System

Web
browser

Multitasking process
Advantages of Multitasking
 
1. Multitasking helps in increasing the overall productivity
of the user by performing a number of
tasks at the same time
2. It helps in increasing the overall performance of the
computer Word system.
Disadvantages of Multitasking
 
Disadvantages of Multitasking
 
1. It requires more system resources. For example, large
amount of memory is required to execute several
programs at the same time
2. 2. To performing multiple tasks at a single time in
multitasking, the CPU speed must be very high
 
Time Sharing Systems/Time Shared OS
The main idea of time sharing systems is to allow a large number of users to interact
with a computer (system) concurrently. Single A time sharing system is one that allows a
number of different users to share the single computer system for a variety of
applications at the time.
A time sharing system allows many users to share the computer resources
simultaneously. In other words, time sharing refers to the allocation of computer
resources in time slots to several programs simultaneously.In other words a time-
sharing system is basically a multiprogramming, multitasking and multi- user
environment of a large computer system.
In time sharing a small time slots are available for each user. This short period of time
during that a user gets attention of the CPU (known as a time slice or a quantum).
Those time slots may be only a few microseconds. By using multiprogramming
techniques, which quickly alternate between many users, each receiving a small amount
of time. It seems that each is being given constant attention by the processor.
One of the first time-sharing operating systems to be developed was the Compatible
Time Sharing System (CTSS) developed at the Massachusetts Institute of Technology
(MIT). This system was first developed for the IBM 709 in 1961.
 
In the Fig. 1.9, the user 5 is active

User3 User4

User2 User5

CPU

Active
link User6
User1
 
but user 1. user 2, user 3, and user 4 are in waiting state User 3
whereas user 6 is in ready status.As soon as the time slice of user 5 is
completed, the control moves on to the next ready user le user 6. In
this state user 2, user 3, user 4, and user 5 are in waiting state and user
1 is in ready state.
The process continues in the same way and so on. Example: Fig 19
shows an User 2 User 5example of time sharing system Active link User
1 User 6 which allows many users to simultaneously share the Fig. 1.9
computer resources.
Advantages of Time Sharing System
1. Efficient CPU utilization.
2. A time shared operating system uses CPU scheduling and multi
programming to provide each user with a small portion of a time shared
computer. Time sharing systems were developed to provide interactive use
of a computer system at a reasonable cost.

Disadvantages of Time Sharing System:


1.The time-shared systems are more complex than the multi-programming
systems.
2. In time-shared systems multiple processes are managed simultaneously
which requires an adequate management of main memory so that the
processes can be swapped in or swapped out within a short time.
1.2.6 Multiprocessor Systems :
Multiprocessing is the use of two or more Central Processing Units (CPUs)
within a single computersystem. ine term multiprocessing also refers to the
ability of a system to support more than oneprocessor and/or the ability to
allocate tasks between them.
There are many variations on this basic theme, and the definition of
multiprocessing can vary with context, mostly as a function of how CPUs are
defined. (multiple cores on one die, multiple chips inone package, multiple
packages in one system unit, etc.).
Multiprocessing sometimes refers to the execution of multiple concurrent
software processes in a system as opposed to a single process at any one
instant.
However, the term multiprogramming is more appropriate to describe this
concept, which is implemented mostly in software, whereas multiprocessing is
more appropriate to describe the use of multiple hardware CPUs.
• A system can be both multi prrocessing and multiprogramming ,only one of
the two or neither of the two.
• Multiprocessor system (parallel system) Most systems to date are single
processor i.e. they have only one main CPU.
• Some systems have more than one processor in close communication,sharing
the computer bus,the clock and sometimes memory and peripheral
devices.these systems are referred to as tightly Coupled systems.

You might also like