Difference between Thread and Task

Posted by Leila under C# on 4/19/2012 | Points: 10 | Views : 10668 | Status : [Member] | Replies : 13
Can someone explain what is the difference between multithreading and multitasking ior parallel tasks?
(especially in point of view of using processors)

Thanks,
Leila



Responses

Posted by: Sakthi.Singaravel on: 4/19/2012 [Member] Silver | Points: 25

Up
0
Down
A task is something you want doing.

A thread is one of possibly many workers who perform that task.


Regards,
Singaravel M

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/19/2012 [Member] Silver | Points: 25

Up
0
Down

Task represents an asynchronous operation.

Thread(s) are used to complete that operation by breaking the work up into chunks and assigning to separate threads.


Regards,
Singaravel M

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Multitasking - Tasks sharing a common resource same as like 1cpu

Multithreading -It provides a way to have more than one thread executing in the same process. whereas allowing every thread access to the same memory address space. This allows very fast communication among threads.

------------------------------------------------
Learn throughout life

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gsm_Gsv on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Multitasking: Many task running simultaneously at a time
Multithreading: A single process is broken logically, executed simultaneously, and the results are combined at the end of processing.

---------------------------------------
Live the life you've dreamed

Regards
MADHU

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Multitasking : In computing, multitasking is a method by which multiple tasks, also known as processes, share common processing resources such as a CPU. With a multitasking OS, such as Windows XP, you can simultaneously run multiple applications. Multitasking refers to the ability of the OS to quickly switch between each computing task to give the impression the different applications are executing multiple actions simultaneously.

MultiThreading : Multithreading extends the idea of multitasking into applications, so you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different applications, but also among each thread within an application.

____________
www.flickr.com/photos/psdesigner/

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Leila on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Thank you for your response.
Can I say taht when I use multithreading, one processor is used while when using parallel tasks more than a processor (2 processors for dual core CPU) work, so I can see 2 tasks working at the same tick which can't be seen in the thread???

Thanks,
Leila

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Yeah

------------------------------------------------
Learn throughout life

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gsm_Gsv on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
For example, consider "Intel Xeon Nehalem-EX" processor which has got 8 cores and 16 threads, where each core has 2 logical cores for a total of 16 logical cores allowing the execution of 16 application threads on a single processor.


---------------------------------------
Live the life you've dreamed

Regards
MADHU

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
You can say...

Please mark as answer if it helped you..

____________
www.flickr.com/photos/psdesigner/

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sahoo on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Hi ALL,

Can any give simple example of multitasking,multiprocessing and multithreading ?

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Dotnetrajanikanth on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Multitasking : In your pc if you are running more than 1 application at a time it is multi tasking like playing games and listening songs at the same time.

Multithreading is an internal process. Like (its just an example) while writing a word document one thread will be checking the spelling another will help in formating like that.

____________
www.flickr.com/photos/psdesigner/

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oliviau on: 9/13/2016 [Member] Starter | Points: 25

Up
0
Down
Great post. Thanks for sharing.
Olivia at http://www.ampronix.com/


Leila, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Aditihasini on: 9/14/2016 [Member] Starter | Points: 25

Up
0
Down
Just now i saw this post. Nice answers :)

Bulk DND Check Online
https://www.mobtexting.com/check-dnd-online.php

Leila, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response