Multitasking & Multithreading

kvivekanand used Ask the Experts™
Can anyone the difference between Multitasking and multithreading or are both of them the same.plss enlighten me...
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2007

Similar but also different nuances.
Multithreading is usually a single task/program that is running as seperate threads ( smaller tasks ). This can also mean something like opening 4 instances of  netscape at once.

Multitasking is a general term for running more than one task ( usally a program ) at one time. It is on a larger scale, and not at the thread level.
Say running Word and Excel simultaneously with a print job in the background.

I hope this helps.

Multi-tasking is usualy applied to an OS, multi-threaded to a particular program.  

Multi-tasking is also much older and first appeared to describe those mainframe OS's on which time-slicing and task switching were first implemented.

Multi-threaded is a much newer term that has replaced the various older corresponding vendor specific adjectives.

For example, Univac 1100 machines under Exec8 et al were called and multi-tasking.  A program that ran on that machine that had multiple simultaneous chunks of code running were called multi-activity programs - same meaning as the current multi-threaded.
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Early computers were only able to perform one taks at a time. This also applied to early micro computers as well. This is 'single tasking'.
Later, it became possible for computers to share their resources between several different tasks by giving each a slice of time to execute, suspending activity and then allowing the next task to have its slice of time. That way fast computers could give the illusion that they were performing several tasks simultaneously. This technique of sharing the computer time is called 'time slicing'. In reality they still only performed one task at a time like single tasking computers but were able to perform as if they were running several tasks at once.
Multi-tasking came next with the ability for a computer to really perform several tasks at once. This does require several processors but not necessarily several CPU's. For example your computer may have a CPU, a graphics processor, a I/O processor etc. While a task is being executing on the CPU another may be using the graphics processor before going back to the CPU and another may be using the I/O processor before going back to the CPU or other processor. Multi tasking is a superset of time slicing as ultimately all processors are time sliced between the different tasks but they are each managed in such a way that several tasks may be doing things simultaneously.
Multi-threaded is a similar logical process to multi-tasking but is applied to a program or application. It is the ability of a program to execute different parts of itself at the same time. Each thread is a sequence of serial mini-tasks that are performed one after the other. The program is able to run several of these mini-task streams (or threads) at the same time. They must still share the physical resources of the computer the same way as the other techniques discussed above. The big advantage of multi-threading is that a program can do (or appear to do) several things at once. Most modern game software uses multi-threading and Age of Empires is a prime example where the multi-threading is visible. Each figure is performing its own set of movements independent to all other figures. Furthermore each figure is able to interact with other figures, so communication between program threads is possible. If that is still not clear, consider this. You can participate in multiple threads on a bulletin board discussion group. Each message thread is a sequence of entries related to each other in a specific order, but the board can hold many such threads each following their own path. Sometimes the threads can join, othertimes not.
Therefore multi-threading is applying to programs the same capability that multi-tasking provides to the entire computer.
I hope that answers your question.



Answer accepted



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial