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

Add notes about the budget and interrupts #36

Closed
wants to merge 2 commits into from

Conversation

podhrmic
Copy link

@podhrmic podhrmic commented Jun 23, 2023

Clarifications.

}
```

On the other hand, if a PD has `budget` available, but receives no notification, it is not run at all. Returning from `notified()` function and calling `seL4_Yield()` during the PD execution has the same effect, and donates the remaining budget of the PD.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Returning from notified() function and calling seL4_Yield() during the PD execution has the same effect, and donates the remaining budget of the PD." Has the same effect as what exactly? I'm not sure what you mean by calling seL4_Yield after returning from the notified entry point?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is based on the discussion here. In my understanding, you can either return from notified() or call seL4_Yield() somewhere in your notified() function, and that will end the execution of that particular PD in the given period. Is that accurate?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While seL4CP doesn't stop anyone from doing this in their user-code, I am kind of hesitant to have this in the manual as I don't think there should be any need to call seL4_Yield and having a non-event driven PD seems to go against the principles of seL4CP.

docs/manual.md Outdated
@@ -263,6 +292,8 @@ sel4cp does not provides timers, nor any *sleep* API.
After initialisation, activity in the system is initiated by an interrupt causing a `notified` entry point to be invoked.
That notified function may in turn notify or call other protection domains that cause other system activity, but eventually all activity indirectly initiated from that interrupt will complete, at which point the system is inactive again until another interrupt occurs.

An interrupt must be acknowledged with `sel4cp_irq_ack()` in the `notified()` function, otherwise it will not be fired again.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An interrupt doesn't necessarily have to be acknowledged in the notified() function. My understanding is that the interrupt will continue to be fired, it just won't be delivered to seL4. Perhaps it would be better to say "otherwise the interrupt will not be delivered again".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I updated the wording.

@Ivan-Velickovic
Copy link
Collaborator

Just a general question I have is how did you interpret seL4-specific terminology such as "scheduling context" which isn't really explained in the seL4CP manual? Did you refer to the seL4 manual or are you already familiar with the concepts from previous seL4 experience?

@podhrmic
Copy link
Author

Just a general question I have is how did you interpret seL4-specific terminology such as "scheduling context" which isn't really explained in the seL4CP manual? Did you refer to the seL4 manual or are you already familiar with the concepts from previous seL4 experience?

I read the seL4 manual, and have some previous experience, but I am by no means an seL4 expert.

@Ivan-Velickovic
Copy link
Collaborator

Just a general question I have is how did you interpret seL4-specific terminology such as "scheduling context" which isn't really explained in the seL4CP manual? Did you refer to the seL4 manual or are you already familiar with the concepts from previous seL4 experience?

I read the seL4 manual, and have some previous experience, but I am by no means an seL4 expert.

Cool, was just wondering. We should probably link to the seL4 manual or explain what a scheduling context is in the seL4CP manual but that can be done in another PR.

@podhrmic
Copy link
Author

podhrmic commented Oct 6, 2023

@Ivan-Velickovic I am happy to close this PR - the existing documentation and tutorial is IMHO pretty good, if there is a need to further explain scheduling, perhaps a separate dedicated chapter with examples is better.

@Ivan-Velickovic
Copy link
Collaborator

There are some useful changes here, I just think the code example is not necessary. You can close the PR and I can take your patch and adjust in a new PR, if that's okay with you.

@podhrmic podhrmic closed this Oct 8, 2023
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

Successfully merging this pull request may close these issues.

2 participants