Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect switch count in timectxsw.c #3

Open
cs5115 opened this issue Feb 8, 2018 · 0 comments
Open

Incorrect switch count in timectxsw.c #3

cs5115 opened this issue Feb 8, 2018 · 0 comments

Comments

@cs5115
Copy link

cs5115 commented Feb 8, 2018

Hi tsuna,

In your timectxsw.c benchmark, the variable nswitches is not correct.

It should be:
const int nswitches = iterations * 6;

and not:
const int nswitches = iterations << 2;

If you follow through the child and parent for loops you will see there are 6 context switches per iteration.

Many thanks for a really useful bit of code.

Christo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant