Interleaving Techniques
These techniques allow an efficient utilization of resources like CPU processing capability, memory, etc.
These techniques combine the processing work of many users, many tasks and big tasks to achieve maximum utilization of resources.
The efficient utilization of resources is achieved with the help of operating system capabilities.
Some of the common interleaving techniques are multiprogramming, multiprocessing, multitasking, foreground and background processing and virtual memory etc.
Multiprogramming:
Multiprogramming technique is used in the multi-users environment, It is technique in which many users programs are executed simultaneously by single processor or CPU.
Multiprogramming means when two or more programs are fired or loaded into the internal storage of CPU at the same instant.
And from the loaded programs once the portion of one program is executed and then a portion of another program is executed and so on.
Thus multiprogramming refers to concurrent execution of several programs.
The main purpose of multiprogramming is to increase the utilization of a computer and its resources.
For multiprogramming, a CPU works in timesharing mode for responding to the requests of many users or I/O devices at the same instant; and thus provides concurrent execution of many instructions/programs.
Multiprogramming technique is possible due to very high processing speed of a CPU.
High processing speed of CPU helps it to allocate its time to every user's programs in a time sharing mode, and in such a manner that every user feels that CPU is working for his programs only.
In fact, the CPU works for each user's programs in the given allocation of time, but as said above this timesharing happens so fast that every user feels that CPU is working for his programs; but in reality the CPU is working for other users also at the same time.
Multiprocessing:
Multiprogramming and Multiprocessing are not same concepts.
Multiprogramming involves concurrent execution of two or more programs for controlling the different activities or execution of many instructions/programs simultaneously
In multiprocessing, the instructions are executed simultaneously because different CPUs are available for executing different instructions simultaneously.
Multiprocessing concept is also known as parallel processing. wherein many processors work in parallel to solve one big task or many tasks simultaneously.
Multiprocessing is more costly and complex technique to employ than multiprogramming.
Multiprocessing helps to increase the program execution speed on a computer.
Multitasking:
Multitasking refers to ability of a system to execute two or more tasks for a single user.
Multitasking operating system allow a user to execute or switch between many tasks simultaneously.
In the past, there used to be single user operating system like DOS etc. which were able to execute one task at a time. If a user you want to execute another task then first opened task should be switched off to execute another task.
But the O/S like Windows, etc are multitasking operating systems; and these operating systems allow users to execute many tasks simultaneously. For Example: We can open MS- Word document as well MS- Excel document to work at the same time.
Multitasking operating systems increase the productivity of users for use of computers, because users can execute many tasks, can compare the many outputs simultaneously; and even can exchange the values from application to another.
Presently, most of the operating system like Windows, LINUX, XENIX, etc are multitasking operating systems.
Spooling:
Spooling is process used to compensate the speed difference between high speed CPU and slow speed Input/Output devices.
Spooling is used for printing purpose. You all might have noticed that we can provide many files printout together, although the printer can print one file at a time. but all files get lined up in a queue and get printed one by one by printer. In this process, CPU remains free and users can work on other applications. The technique of printing is possible through a capability of operating system known as Spooling.
Actually, When a user provides many documents together for printing to printer then CPU being a high speed component immediacy process all the given documents and provides these documents to printer for printing. But printer being a slow speed device can not print all the jobs at same speed as processed by CPU.
Here, Spooling technique is used which allows the processed jobs of CPU to be arranged in a seperate area in the memory known as spooling area, and CPU remains free for other jobs. And printer as and when become free from printing previous job automatically takes up the next job from spooling area.
Spooling is possible using buffer memory which is also known as spooling area; and this memory hold the processed jobs by CPU, temporarily. And provides these jobs to printer for prinitng as and when printer becomes free from prinitng previous job.
إرسال تعليق