Friday, March 14, 2014

Multi-programming:

In batch processing, programs are executed one by one. The memory and ALU of the
machine are not being fully utilized. To get the maximum use of the machine, multiprogramming
system is used. “Multi-programming enables to store and execute more than one
program in the CPU at the same time”. The multi-programming concept is event based. The
purpose of multi-programming is to increase utilization of the computer system as whole.
Multi-programming is defined as execution of two or more program that all reside in
primary storage. Since the CPU can execute only one instruction at a time, cannot
simultaneously execute instructions from two or more program. However, it can execute
instructions from one program then from second program then from first again, and so on. This
type of processing is referred to as concurrent execution. Using concept of concurrent execution,
multi-programming operate in the following way:
When processing is interrupted on our program, perhaps to attend an input or output
transfer, the processor switches to another program. This enables all, parts of the system, the
processor, input and output peripherals to be operated concurrently thereby utilizing the whole
system more fully. When operating on one program at a time the processor or peripherals would
be idle for a large proportion, if the total processing time, even though this would be reduced to
some extent by buffering. Buffering enables the processor to execute another instruction while
input or output is taking place rather than being idle while transfer was completed. Even then,
when one program is being executed at a time, basic input and output peripherals such as floppy
disk drive and line printers are slow compared with the electronic speed of the processor and this
causes an imbalance in the system as a whole. However, in a multi-programming environment
the CPU can execute one program's instructions while a second program is waiting for I/O
operations to take place.
In a system of multi-programming storage is allocated for each program. The areas of
primary storage allocated for individual programs are called ‘partitions’. Each partitions must
have some form of storage protection and priority protection to ensure that a program must have
some form of storage protection to ensure that a program is one portion will not accidentally
write over and destroy the instructions of another partition and priority (when two or more
programs are residing in primary storage) because both programs will need access to the CPU's
facilities (e.g.; the arithmetic and logic section) A system of priority a method that will determine
which program will have first call on the computer's facilities is normally determined by locating
the program in specific partitions.
Programs that have the highest priority normally are stored in an area called the
‘foreground partition’. Programmes with lowest priority are stored in an area called ‘background
partition’.

No comments:

Post a Comment