Skip to content

Incorrect switch count in timectxsw.c #3

Description

@cs5115

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions