LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2016, 10:24 AM   #1
SAGARSINGHA
LQ Newbie
 
Registered: Aug 2016
Posts: 12

Rep: Reputation: Disabled
Multithreading in Uniprocessor machine


HI,

Can any one please clear me out how Multithreading is useful in Uniprocessor system(Except the I/O event scenario).as the main aim of multithreading is parallel processing.
 
Old 10-18-2016, 10:34 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Welcome to LQ!

Maybe these links will help you;
Quote:
Multithreading may refer to:
Hope this helps.
Have fun & enjoy!
 
Old 10-18-2016, 03:10 PM   #3
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
Quote:
Originally Posted by onebuck View Post
Hi,

Welcome to LQ!

Maybe these links will help you; Hope this helps.
Have fun & enjoy!
Neither of those links seem to be valid. They link to
Code:
http://javascript<b></b%3E:void(0)
 
Old 10-18-2016, 03:40 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,668
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
"Multithreading on a uniprocessor machine" really isn't for "parallel processing." You are not multiplying the CPU resource: you are dividing it.

The main thing that multithreading gives you is the opportunity to overlap input/output (I/O) operations. Most processes actually spend most of their time waiting on something-or-other, and multithreading enables other units of work to be dispatched while others are waiting.

Often, what actually happens is that each process wakes up, evaluates the result of the I/O operation that it had just completed, then sets-up and starts another I/O operation and goes back to sleep again, having consumed only a negligible amount of CPU time in the interim. (We call these workloads, "I/O-bound," since their completion time is mostly tied to the speed of the I/O subsystem.

Some multithreaded scenarios also involve so-called "CPU-bound" activities that really do burn-up all the CPU time that they can get. By assigning an inferior dispatching-priority to these, we allow them to "run in the background," consuming their full time-slices whenever they can get them but immediately yielding control of the machine to other, more-interactive tasks.

As long as the various units of work are not competing for the same resource, and as long as their combined impact on the machine does not exceed the infrastructure's ability to actually handle it, multithreading does afford the opportunity to do more work in less time ... [only] in properly-designed scenarios.

Last edited by sundialsvcs; 10-18-2016 at 03:42 PM.
 
Old 10-18-2016, 04:37 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Quote:
Originally Posted by Sefyir View Post
Neither of those links seem to be valid. They link to
Code:
http://javascript<b></b%3E:void(0)
Sorry for the bad links;Hope this helps.
Have fun & enjoy!
 
1 members found this post helpful.
Old 10-18-2016, 06:43 PM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Linux is a true multithreading OS. Uniprocessor machines of today use processors with multiple cores, each of which can handle threads. On Intel processors (Core i3, i5 and i7) each core can handle (2) threads. With certain programs you can specify the number of cores to use, such as with
Code:
make -j6
will use 6 cores to compile the program.

But multithreading only works if the software can take advantage of it. Programs like word processors, web browsers, and photo editors typically will only use one processor core.
 
Old 10-18-2016, 09:03 PM   #7
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,005
Blog Entries: 26

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
Quote:
Originally Posted by AwesomeMachine View Post
Linux is a true multithreading OS. Uniprocessor machines of today use processors with multiple cores, each of which can handle threads. On Intel processors (Core i3, i5 and i7) each core can handle (2) threads. With certain programs you can specify the number of cores to use, such as with
Code:
make -j6
will use 6 cores to compile the program.

But multithreading only works if the software can take advantage of it. Programs like word processors, web browsers, and photo editors typically will only use one processor core.
I would just correct 1 thing. Desktop i5's are non hyperthreaded and only do 1 thread/core (as they're quad core vs. the hyperthreaded dual core i3's and quad core hyperthreaded i7's), as well as mobile core-i5 H-series chips (which are also quad core), although mobile U-series chips are all hyperthreaded.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Kernel 3.5.4 - uniprocessor system fails to boot with multi-processor option off VolumetricSteve Linux - Software 3 10-26-2015 07:40 AM
what are different spinlock hang scenarios on uniprocessor? skaushal_lk Linux - Newbie 1 01-02-2014 02:37 AM
hard drive performance issue when running a SMP kernel on a uniprocessor casnight Linux - Kernel 2 12-30-2010 06:38 AM
SMP kernel on uniprocessor. digger95 Slackware 2 06-06-2008 04:22 PM
uniprocessor or multiprocessor help stevematrix Linux - Hardware 1 11-12-2006 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration