-
October 19th, 2017, 06:13 AM
#1
what is the difference b multitasking and multithreading ?
-
October 19th, 2017, 01:12 PM
#2
Re: what isthe difference b multitaking and multithreading ?
It was already discussed a lot since a long time before...
https://www.google.ch/search?q=multi...hrome&ie=UTF-8
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.
Victor Nijegorodov
-
October 26th, 2017, 03:28 AM
#3
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 .
-
January 11th, 2018, 04:16 AM
#4
Re: what isthe difference b multitaking and multithreading ?
Multitasking means several programs are executed concurrently and multi threading means several threads execute at the same time..
-
January 11th, 2018, 04:28 AM
#5
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!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
January 12th, 2018, 04:00 AM
#6
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.
-
January 12th, 2018, 04:32 AM
#7
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!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
February 7th, 2018, 01:16 AM
#8
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.
-
December 13th, 2018, 12:37 AM
#9
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.
-
December 13th, 2018, 04:05 AM
#10
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,
https://techdifferences.com/differen...ing-in-os.html
-
December 13th, 2018, 09:21 PM
#11
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.
-
December 14th, 2018, 07:05 AM
#12
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.
Last edited by wolle; December 14th, 2018 at 07:14 AM.
-
December 14th, 2018, 09:34 AM
#13
Re: what is the difference b multitasking and multithreading ?
I'm referring to the following which is a quote from post #9 but essentially was also in the link in post #10.
in multi-threading CPU has to switch between multiple threads to make it appear that all threads are running simultaneously.
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.
-
December 14th, 2018, 05:31 PM
#14
Re: what is the difference b multitasking and multithreading ?
Originally Posted by Arjay
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.
Last edited by wolle; December 20th, 2018 at 02:27 AM.
-
December 14th, 2018, 08:17 PM
#15
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.
I'm into the concrete implementation on Windows.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|