Linux Kernel Network Subsystem Patching
Bob Jonkman
bjonkman-w5ExpX8uLjYAvxtiuMwx3w at public.gmane.org
Tue Jan 21 23:36:38 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanx, Len.
> Multithreading is multiple threads in a process. Every process
> has at least one thread
Even a single, 1-core processor can run multi-threaded code, can't it?
I imagine by the OS timeslicing. The Amiga was the computer I saw
where someone pointed out the pitfalls of multi-threading, and I'm
sure that didn't have multi-core. But I expect that code that runs
multi-threaded on a 1-core processor would run better on a multi-core
processor.
How much code tweaking is necessary for a multi-threaded program to
take advantage of multiple cores? Or does the compiler take care of that?
- --Bob.
On 14-01-21 05:42 PM, Lennart Sorensen wrote:
> On Tue, Jan 21, 2014 at 04:26:24PM -0500, Bob Jonkman wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>
>> Is there a difference between hyperthreading and multithreading?
>>
>> (Not a snark -- I really don't know, and would like to...)
>
> Hyperthreading is one way to give you multiple hardware threads.
> Actual seperate cores is another way. To software there is no
> difference between a CPU core and a CPU thread. Every core has at
> least one hardware thread. Hyperthreading gives each core 2
> threads (in all current implementations). power6 has 2 threads per
> core of SMT, and power7 has 4 threads per core. power8 is likely
> to have 8 threads per core.
>
> Multithreading is multiple threads in a process. Every process
> has at least one thread (if it has more than the first one, then it
> is a multithreaded program). The system runs one thread on one CPU
> at any given time, so a multithreaded program could be using
> multiple cores at once, or at least multiple hardware threads on a
> core.
>
> The hardware threads share some resources, such as execution
> units, but do not share CPU registers. Each CPU core on the other
> hand is independant (in general. AMD's newer chips is starting the
> share the FPU between two cores in interesting ways, without
> sharing anything else).
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Ensure confidentiality, authenticity, non-repudiability
iEYEARECAAYFAlLfBIEACgkQuRKJsNLM5erEDQCfYycJJe9wxLT3JcCikUf3eWuc
awsAn0oAe3dvGxIWxSOM2A0fVtqla2X8
=B+hW
-----END PGP SIGNATURE-----
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list