Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rtic_f4xx_nucleo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ruben Asplund
rtic_f4xx_nucleo
Commits
a33a71e3
Commit
a33a71e3
authored
4 years ago
by
Ruben Asplund
Browse files
Options
Downloads
Patches
Plain Diff
Updated timing_resources
parent
4191372c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/timing_resources.rs
+11
-2
11 additions, 2 deletions
examples/timing_resources.rs
with
11 additions
and
2 deletions
examples/timing_resources.rs
+
11
−
2
View file @
a33a71e3
...
...
@@ -269,13 +269,18 @@ const APP: () = {
//
// You find a comparison to a typical threaded counterpart `freeRTOS` in Table 1.
//
// Give a rough estimate based on this info how long the complete task `
uart
1`,
// Give a rough estimate based on this info how long the complete task `
exti
1`,
// would take to execute if written in FreeRTOS. (Include the context switch, to higher
// priority task, the mutex lock/unlock in both "threads".)
//
// Motivate your answer (not just a number).
//
// [Your answer here]
// Job latency and job overhead for both exti0 and exti2: 2* (650 + 1522)
// Lock and unlock in exti1 260 + 170
// Critical section in the lock 40
// Memory job 462 * 2 (It changes the resources 2 times, one time in exti0 and exti1 each.)
// Result: 2* (650 + 1522)+260 + 170+40+462 * 2 = 5738 cycles
//
// Notice, the Rust implementation is significantly faster than the C code version
// of Real-Time For the Masses back in 2013.
...
...
@@ -283,6 +288,10 @@ const APP: () = {
// Why do you think RTIC + Rust + LLVM can do a better job than hand written
// C code + Macros + gcc?
//
// (Hint, what possible optimization can safely be applied.)
// (Hint, what possible optimization can safely be applied
by RTIC + Rust + LLVM
.)
//
// [Your answer here]
// Rust with RTIC does not have threads which means it is not switching task as often as in C.
// When there are fewer switches between tasks, the need for locks is less.
// There are no need for memory managment in rust compared to C.
//
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment