Sensoria Tour

Multi Tasking Vs Multi Threading Vs Multi Programming PDF Print E-mail
User Rating: / 4
PoorBest 
Written by Ravi Maggon   
Saturday, 30 January 2010 16:56
All of the above mentioned things are related to the way of processing and completing various processes (i.e a program in execution) by the processor in our computers. It was felt that when one or more processes come in the job pool of the processor and requires execution it was difficult to handle those processes. So the things that came into existence were Multiprogramming, Multitasking, MultiThreading. I would be discussing them all in brief as we proceed down the article.

Multi Tasking

Muti Tasking also known as time sharing is basically when more or jobs that require execution comes to the processor but we all know that the processor can handle or process only one job at a instant of time, so it was thought that processor will give a set amount of time to each process and after that given interval of time it will shift to next job also if the job has not completed, and when the jobs finishes it again comes back to the jobs that were left incomplete. This technique is very helpful for the operating system to operate in the way it avoids starvation of jobs (Starvation is term used for the task that came in the memory and remained unprocessed because the processor was unavailable to such task. This problem was mainly because of First cum First Serve Scheduling technique).

Muti Programming

Muti programming is the technique slightly different from the multi tasking in the way that here processor doesn't shift from time to time from one job to other but when a process in execution goes in wait state may be for I/O resources or something else, the processor shifts to the other process waiting in the pool of jobs. Multiprogramming doesn't give any guarantee that a program will run in a timely manner. Indeed, the very first program may very well run for hours without needing access to a peripheral. As there were no users waiting at an interactive terminal, this was no problem: users handed a deck of punched cards to an operator, and came back a few hours later for printed results. Multiprogramming greatly reduced the waiting.

Co-operative multi tasing/time sharing

When the computer usuage evolved from batch to interactive mode multi programming was no longer felt a suitable approach. Each user wanted to see his program running as if it was the only program in the computer. This was made possible by the time sharing technique. Cooperative multitasking was once the scheduling scheme employed by Microsoft Windows, Mac Os, etc  in order to enable the running of multiple applications simultaneously.
But one of the problem of time sharing or multi tasking is that of context switching. Context switching is the latency or the delay we get when processor shifts from one job to another job. Thus another approach of multi threading was developed so as to overcome all the drawbacks of the above mentioned techniques.

Muti Threading

Muti threading involved the phenomenon of dividing a job (program in execution) into number of threads which are the smallest possible thing in a process and executing the threads simultaneously in the same memory. Thus, threads are basically processes that run in the same memory context. Threads are described as lightweight because switching between threads does not involve changing the memory context.
Last Updated on Saturday, 30 January 2010 17:00
 

Login Here



Who's Online

We have 20 guests online