Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:46:31+00:00 2026-06-03T19:46:31+00:00

I’m trying to understand how does multi-core systems work and how to program efficient

  • 0

I’m trying to understand how does multi-core systems work and how to program efficient programs for systems with many cores. I know this is very hard topic but i’m very interested in fastest solutions possible.

First of all, i’m trying to understand how does threading work. It’s obvious, that in most cases multithreading can increase the performance dramatically. According to this page, this is how multithreading work:

enter image description here

But why is switching between N threads is faster than just running N threads one by one ? How can threading work on system with only one CPU ?

Next, what is the point or multi-core programming? I assume that the point is to split threads between cores and split tasks between them ? But how can i split 8 threads on 4 CPU’s system equally ?

Do i have to use processor affinity (cpu_affinity) to split threads/processes between CPU’s ? Can i create 4 threads using pthread_create on system with 4 CPU’s to run each thread on each CPU ?

How hyper-threading helps and is it helps at all ? How can we use CPU cache programming for multi-core systems ?

Why is this so hard for big old projects, like MySQL for example, to fully use advantages of many-CPU systems ?

I’m interested in theory of this problem and also in practical solutions/examples/projects/books/articles for Linux systems (using C).

I know this is increasingly important topic and I hopes I’m not only one interested.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:46:33+00:00Added an answer on June 3, 2026 at 7:46 pm

    The difference between switching N threads and running N threads one by one is what happens when a thread, temporarily, can make no further forward progress. If you switch N threads and one of those threads temporarily can’t make forward progress, say it’s waiting for data to be read from the disk, another thread can make forward progress. If you ran them completely sequentially, then the CPU would be wasted while a thread was waiting for disk I/O to complete.

    Hyper-threading helps by allowing you to make fuller use of CPU core execution resources. For example, if a thread isn’t doing any floating point math, the floating point units of that core are wasted. With hyper-threading, another thread can use those execution units.

    On a typical modern core, operations take many clock cycles and a number of operations are in progress at a time. This means a core typically has many extra execution resources that it can’t use at any particular instant. Hyper-threading allows a higher percentage of those execution resources (barrel shifters, adders, logic units, branch units, and so on) to be used. Typically, hyper-threading may improve performance by 10% to 15%. The benefit isn’t greater because the threads also steal execution resources from each other, pollute each others use of cache, and so on.

    The CPU cache is used automatically and you generally don’t have to do anything special to use it. Perhaps the most common exception is dealing with false sharing or cache ping-ponging.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.