Wednesday, December 14, 2011

What are the two types of multi-tasking?

Multi-tasking:
In multi-tasking several tasks are given to the processor at a time. Suppose there are 4 tasks that we want to execute. The microprocessor has to execute them all at a time. So processor will take some time duration, like a milli second and divides the time between number of jobs. So 4 jobs are there. So we get 1/4 millisecond time for each job. First it will execute first job. If it is completed with in the time it goes for 2nd job. Otherwise it will store the results in temporary memory. After executing the 4th job again it comes for 1st job. This will be done in a circular manner. This is called round robin method.

multi-tasking is of two types.
1.Process based multi-tasking
2.Thread based multi-tasking

1.Process based multi-tasking:
Multiple processes are given to the processor at a time.

2.Thread based multi-tasking:
Several parts of the same program is executed at a time. If the program contains two parts, it will use two threads.