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 3213406
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:56:27+00:00 2026-05-17T14:56:27+00:00

I have a situation where, in a multithreaded application, many different threads are accessing

  • 0

I have a situation where, in a multithreaded application, many different threads are accessing a Dictionary at the same time. It appears that this could be a bottleneck, but it’s unclear – a plausible scenario is that multiple threads may be trying to retrieve the same value (do note, however, that the data structure is fixed – no thread is doing any writing, but dozens could be trying to read the same value). The question is, can multiple threads read the same value simultaneously, or is it one at a time? If so, is there any other data structure that could be used?

  • 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-17T14:56:28+00:00Added an answer on May 17, 2026 at 2:56 pm

    Multiple threads should have no problem reading the same memory value. There may be a small wait at the OS or hardware level while the memory is actually accessed for each thread, but that’s miniscule in most cases, and not easy to work around.

    What got my attention about your description of the problem is that “dozens [of threads] could be trying to read the same value”. If you have dozens of active threads processing at once, the bottleneck is thread management. Like anything, there is a law of diminishing returns, and diseconomies of scale; with current hardware, at about twice the number of active threads as “execution units” (cores, HT logical processors, however the architecture handles multithreaded execution), your CPU starts spending more time scheduling thread execution and managing thread states than it is actually executing the threaded instructions. Yes, your Task Manager may show hundreds of threads in flight, but the overwhelming majority of these are “sleeping”, listening for user interaction, or just waiting (like polling threads).

    I would look at reducing the number of threads to no more than two per “execution unit”, and ideally only a couple more than the number of execution units (so EUs have a thread to “switch to” while the FSB is reading memory for another thread). That will reduce the overhead time your computer spends managing all these threads.

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

Sidebar

Related Questions

I have a multithreaded application that has many concurrent operations going on at once.
Situation: I have a multithreaded program written in C. If one of the threads
We have a situation in our product where for a long time some data
I have a situation where I have two entities that share a primary key
I really have a strange situation. I'm making a Linux multi-threaded C application using
I have situation when GC has no time to delete free objects. The code
I can't make git push origin B. I have situation something like this _____________________________________
I have a situation in which I want to start 3 threads called: tr1,
Having what appears to be a dead-lock situation with a multi-threaded logging application. Little
I have a very strange situation. Basically I have code that uses a decryptor

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.