• Subscribe

Word of the week: Multithreading

Word of the week - Multithreading


A single-core machine multithreading is much like a good juggler: you may only be doing one thing at once, but you have to be really good at switching between balls or you'll drop one! Image courtesy of Guillaume Riesen

Until recently, most computers had a single processor (CPU) which contained a single core. Computers could execute only one task at a time.

Then multi-threading came along. top500's glossary of terms describes multithreading as:

A capability of a processor core to switch to another processing thread, i.e., a set of logically connected instructions that make up a (part of) a process. This capability is used when a process thread stalls, for instance because necessary data are not yet available. Switching to another thread that has instructions that can be executed will yield a better processing utilisation.

Not all CPUs can do multithreading, and not all applications follow the multithreading programming model. Both must be true for the multithreading to occur.

Multithreading is not parallel processing. The core is still only able to run one thread at a time.

On the other hand, a multithreaded program or algorithm that is run on a cluster, grid, supercomputer, or multi-core system will run in parallel.

Multiprocessing and multithreading on a many-core system are not the same thing either. A process is made up of many threads. As an analogy, consider a tasty four-course meal. A multiprocessing algorithm for cooking the meal would look kind of like a potluck - each attendee (processor) would cook one course (process), and then bring them together at dinner time. A multithreading algorithm for cooking the meal would look more like four people in the same kitchen, cooking the meal as a team. Each cook (processor) would end up working a little bit on each course (process).

A lot of software commonly used in scientific contexts is now incorporating multithreading and multiprocessing capabilities. Now you know how to tell the difference between the two, so that you can make informed decisions about what software to choose.

With reference to:
Thread (computer science), Wikipedia (with special reference to Section 2 )
Multithreading, Wikipedia
Multiprocessing, WordNet

-Miriam Boon, iSGTW

Join the conversation

Do you have story ideas or something to contribute? Let us know!

Copyright © 2021 Science Node ™  |  Privacy Notice  |  Sitemap

Disclaimer: While Science Node ™ does its best to provide complete and up-to-date information, it does not warrant that the information is error-free and disclaims all liability with respect to results from the use of the information.

Republish

We encourage you to republish this article online and in print, it’s free under our creative commons attribution license, but please follow some simple guidelines:
  1. You have to credit our authors.
  2. You have to credit ScienceNode.org — where possible include our logo with a link back to the original article.
  3. You can simply run the first few lines of the article and then add: “Read the full article on ScienceNode.org” containing a link back to the original article.
  4. The easiest way to get the article on your site is to embed the code below.