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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:37:48+00:00 2026-06-02T03:37:48+00:00

Its easy to find and understand the function definition for Amadahl’s Law, but all

  • 0

Its easy to find and understand the function definition for Amadahl’s Law, but all of the working examples I was able to find were either too vague or too academic/cerebreal for my tiny pea brain to understand.

Amadahl’s Law takes to parameters: F, the % of a task that cannot be improved via multi-threading, and N, the number of threads to use.

How does one calculate F with any degree of accuracy?

How do you look at a piece of code and determine whether that will be improved by multi-threading?

  • 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-02T03:37:50+00:00Added an answer on June 2, 2026 at 3:37 am

    It’s relatively easy to say which parts of your code certainly won’t benefit from multi-threading: sequential parts. If you have to carry out a series of small steps in order, muli-threading won’t help because you always need to wait for one step to be done before starting the next. Many common tasks aren’t (necessarily) sequential in this sense: for example, searching a list for a number of items. If you want to extract every red item from a list, you can share parts of the list among several threads and collect all the red items from each part into a final result list. The difficulty in concurrent programming lies in finding efficient ways of doing this for real problems.

    At a lower level you can talk about data dependency: a particular instruction or block depends on a previous block if it uses the results of that block’s calculations in its own. So (pseudocode):

    Block one:
    load r1 into r2
    add r1 to r3 into r4
    
    
    Block two:
    load r4 into r1
    add 3 to r4 into r4
    

    block two depends on block one: they must be executed in order. Here:

    Block one:
    load r1 into r2
    add r1 to r3 into r4
    
    Block two:
    load r1 into r3
    add 3 to r1 into r1
    

    that isn’t the case. This isn’t directly useful for concurrency, but hopefully it illustrates the point more concretely. It also illustrates another problem in handling concurrency: as abstract blocks functionality these two can be run in parallel, but in the concrete example given here they’re reading/writing some of the same registers, so a compiler/pipeliner/whatever would have to do more work to make them run together. This is all very complex, but is covered beautifully in http://www.amazon.com/Computer-Architecture-Quantitative-Approach-Edition/dp/1558605967.

    Which other parts don’t benefit from multi-threading depends on your programming environment and machine architecture.

    As for how to get a percentage, there’s probably some hand-waving involved in a practical case – I doubt you’ll ever get a precise number. If you divide your code up into functional units and profile the execution time in each, that would give you a roughly appropriate weighting. Then if one part that takes up 90% of the execution time can be improved with multi-threading, you say that 90% of your ‘task’ can be so improved.

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

Sidebar

Related Questions

I'm pretty sure it's easy but I can't seem to find it. I have
I know it's an easy way of doing it but i didn't find it
first of all i would like to say i know its probably an easy
I'm trying to implement a quite easy ajax call but since its my first
It's easy to find duplicates with one field: SELECT email, COUNT(email) FROM users GROUP
As its easy to listen to touch events in WPF, is there a way
I think its easy to create form via only html and do not use
Is there a easy way to query a table for its constraints(foreignkeys specificaly) like
I have added an easy compound control which loads its layout from a XML
Is there an easy way to write C code that can access its Git

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.