comp.lang.ada
 help / color / mirror / Atom feed
* Watchdog-Timer Assignment
@ 2018-09-21 10:29 Alex
  2018-09-21 22:35 ` Shark8
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alex @ 2018-09-21 10:29 UTC (permalink / raw)


Hello, I have a school assignment (I have heard that this is important to mention) which I need help with.

You can find my code here: https://ideone.com/LIWmJM

My assignment is this:

Modify F3 from Part 1 so that it occasionally takes more than 0.5 seconds to execute.

Augment the cyclic scheduler from Part 1 with a watchdog task to monitor F3's execution time. When F3 exceeds its deadline (0.5s), the watchdog task should immediately print a warning message. I.e., 0.5s after start of F3, either F3 has finished or the watchdog has printed a message. The watchdog should let F3 finish even if it misses its deadline.

The watchdog task should be started (released) at the same time as (or just before) F3 starts executing, and from that point measure the time that F3 uses.

When F3 misses its deadline the cyclic executive should re-synchronize so that F1 is started at whole seconds.

You should start with this skeleton code: part 2. Examine the code to understand how a task is declared inside an Ada program. Try to modify it in places indicated by the comments. You can also reuse your solution for part 1 as the initial code.

(P.S The skeleton code "part 2" is more or less an empty Watchdog task-body).

I have implemented a random delay for f3 so that it occasionally takes more than 0.5 seconds to execute. My biggest issue (I believe) is that (if f3 takes more than 0.5 seconds to execute) f1 is supposed to start over at the next whole second.

I dont know where I should put that delay for this to happen.

Thank you in advance!


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-09-25 17:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-21 10:29 Watchdog-Timer Assignment Alex
2018-09-21 22:35 ` Shark8
2018-09-21 23:13   ` Alex
2018-09-22  7:04     ` Simon Wright
2018-09-22 11:58       ` Alex
2018-09-22  2:34 ` Anh Vo
2018-09-22 11:54   ` Alex
2018-09-22 13:18     ` Dennis Lee Bieber
2018-09-25 17:05     ` Anh Vo
2018-09-22  3:29 ` Shark8
2018-09-22 11:56   ` Alex

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox