If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: what isthe difference b multitaking and multithreading ?

Multithreading means in any single process, multiple threads is allowed and again, can run simultaneously. Multitasking is sharing of computing resources(CPU, memory, devices, etc.) among processes, while multithreading is sharing of computing resources among threads of a single process.

Re: what isthe difference b multitaking and multithreading ?

In multitasking, several programs are executed concurrently e.g. Java compiler and a Java IDE like Netbeans or Eclipse, while in multi-threading multiple threads execute either same or different part of program multiple times at the same time .

Re: what isthe difference b multitaking and multithreading ?

Multi-tasking is the sharing of computing resources (CPU, memory, devices, etc.) among processes, whilst multi-threading is the sharing of computing resources among threads of a single process. This sharing may or may not be concurrent - depending upon number of physical processors etc. Eg. if there are 4 physical processors then there can be 4 threads concurrently executing; if there is only 1 physical processor then there can be only 1 thread executing at any one time.

All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

Re: what isthe difference b multitaking and multithreading ?

The title fooled me! I was asking "what is Multitaking?" turn out it's Multitasking, which means having multiple tasks, programs, processes running at the same time. While Multithreading is a model for a single process can have multiple code.

Re: what isthe difference b multitaking and multithreading ?

Originally Posted by LinckeU

The title fooled me! I was asking "what is Multitaking?" turn out it's Multitasking, which means having multiple tasks, programs, processes running at the same time. While Multithreading is a model for a single process can have multiple code.

Yeah. I've corrected the title.

All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

Re: what isthe difference b multitaking and multithreading ?

In multitasking the basic thing is that you're running multiple "programs" simultaneously and by simultaneously I mean using time sharing or any similar algorithm where you may or may not use multiple processors.
On the other hand in multithreading you run several tasks of the same program simultaneously, using the same algorithms as that of multitasking which may or may not use multiple processors.

Re: what is the difference b multitasking and multithreading ?

Key Differences Between Multitasking and Multi-threading in OS

The basic difference between multitasking and multi-threading is that in multitasking, the system allows executing multiple programs and tasks at the same time, whereas, in multi-threading, the system executes multiple threads of the same or different processes at the same time.

In multitasking CPU has to switch between multiple programs so that it appears that multiple programs are running simultaneously. On other hands, in multi-threading CPU has to switch between multiple threads to make it appear that all threads are running simultaneously.

Multitasking allocates separate memory and resources for each process/program whereas, in multi-threading threads belonging to the same process shares the same memory and resources as that of the process.

Re: what is the difference b multitasking and multithreading ?

Here's a site called TechDifferences. It's basically answers to lots of what's-the-difference-between-X-and-Y questions. The info seems solid but strangely it's not clear who's providing the information and why. Anyway here's their take on this particular question,

Re: what is the difference b multitasking and multithreading ?

Seems the multitheaded explanations referenced are a bit lacking. Sure, single processor, single core hardware of 20 years ago context switched threads to gave the appearance of simultaneous execution. However, with multi-processor, multi-core hardware of today, the thread scheduler still context switches, but threads can actually execute simultaneously.

Re: what is the difference b multitasking and multithreading ?

Originally Posted by Arjay

Seems the multitheaded explanations referenced are a bit lacking. Sure, single processor, single core hardware of 20 years ago context switched threads to gave the appearance of simultaneous execution. However, with multi-processor, multi-core hardware of today, the thread scheduler still context switches, but threads can actually execute simultaneously.

The multitasking explanation is also lacking. In cooperative multitasking there's not necessarily "a frequent switching between tasks". It could be so but that's up to the tasks. So multitasking can be used to create an illusion of simultaneously running tasks but it's in fact a broader concept than that.

Still I think the reference I suggested works quite well from a mainstream operating systems perspective. It's almost impossible to contrast general concepts without at least some inconsistency in some corner.

I don't think the multi-core hardware of today changes anything really. Multiprocessor computer systems have been around for ages. And the thread dispatcher's job of managing a number of concurrent threads is conceptually the same regardless of the number of available physical processors.

Re: what is the difference b multitasking and multithreading ?

My issue is with "make it appear that all threads run simultaneously". On multi-proc or multi-core hardware, there is no 'appear', they do run simultaneously when procs/cores are available.

Perhaps a subtle distinction not worth mentioning.

Well, multithreading is an abstract concept. It hides the dependency on the number of processors by only requiring that threads appear to be running simultaneously. Whether and when they run simultaneously for real or only looks like they do is left to the implementation.

Every implementation of multithreading exhibits a phase-shift when all processors are busy and threads must start competing for processor time (and this is true for single and multiple processor systems alike). There is nothing subtle about this and it is worth mentioning but it is an implementation detail.

So multithreading attempts to hide the fact that digital computers are finite. Another concept in this category is virtual memory.

Re: what is the difference b multitasking and multithreading ?

Originally Posted by wolle

Well, multithreading is an abstract concept. It hides the dependency on the number of processors by only requiring that threads appear to be running simultaneously. Whether and when they actually run simultaneously or only appear to do so is left to the implementation.

Every implementation of multithreading exhibits a phase-shift when all processors are busy and threads must start competing for processor time (and this is true also for single processor systems). There is nothing subtle about this and it is worth mentioning but it is an implementation detail.

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.