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

  • SEARCH
  • Home
  • 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 6361537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:47:26+00:00 2026-05-24T23:47:26+00:00

Does the number of threads created/able by a program has any relation/constrain with the

  • 0

Does the number of threads created/able by a program has any relation/constrain with the number or core that CPU has? Does the word thread has any relation with Cores of CPU at all?

  • 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-05-24T23:47:26+00:00Added an answer on May 24, 2026 at 11:47 pm

    A computer can only run number_of_cores threads in parallel. If a system has only a single core, only one thread runs at once. Multitasking is only “simulated” by running each thread consecutively for very short periods of time.

    Normally the OS schedules threads arbitrarily on cores. For instance a thread’s one quantum could be run on one core and the same thread’s next quantum could be run on another core. That’s why you see both cores busy when you run a single cpu-heavy thread. This allows single-threaded processes take advantage of multicore systems by distributing load among multiple cores, depending on varying availability.

    More than that, operating systems allow a thread to be “locked” on one or more cores, so it runs dedicated on specified cores only. That’s called affinity mask on Windows. Today’s multicore aware software can take advantage of that and dedicate certain threads to certain cores to optimize its workload. Games do that for dedicating AI for one core, rendering for another for instance. In order to do that efficiently the software has to know how many cores a system has and create and assign threads based on that number.

    Similarly parallel programming frameworks such as OpenMP count the cores to parallelize operations efficiently. They create as many threads as the number of cores on the system to get optimal performance for physical parallelism.

    I think that’s the only case of a relation between number of cores and number of threads.

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

Sidebar

Related Questions

I have a program that does the following: Call webservice (there are many calls
I read on other threads that this does not work: <h:commandButton value=Create New Account
I created a simple program that uses condition variables to create synchronization between two
In Rails Migrations, what does the number specified for the :limit parameter on an
a)In this case does the random number generator uses the system's clock (making the
Does Google cap the number of connections a server can make to Google IMAP
Does Information Hiding mean I should minimize the number of properties my classes have?
Does anybody know how I can get the number of the elements (rows*cols) returned
Does anybody know how to find the number of rows affected AFTER I have
Does T-SQL allow a variable number of arguments to a stored procedure like params

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.