You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: posix/booklet/trampoline-labs.tex
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -308,25 +308,24 @@ \section{Extended tasks and synchronization using events}
308
308
\item modify the code of the tasks:
309
309
\begin{itemize}
310
310
\item task \texttt{task1} activates \texttt{task2} and \texttt{task3} then sets \texttt{evt\_2} and \texttt{evt\_3} before to terminate.
311
-
\item tasks \texttt{task2} and \texttt{task3} wait for their event, clear it, and terminate.
311
+
\item tasks \texttt{task2} and \texttt{task3} wait for their event, clear it, print their name on stdout (\texttt{==Taskx==}) and terminate.
312
312
\end{itemize}
313
313
\end{itemize}
314
314
315
315
Draw a schedule of the new system.
316
-
Then execute the application to check the correctness of your diagram (before to run the application, add outputs in the code of the task, for instance writes to the LCD or LEDs to ease the correctness checking).
316
+
Then execute the application to check the correctness of your diagram and check that the output order the one awaited. Then, in a second step, explain the trace generated and report each trace event to the schedule of the tasks.
317
317
318
318
\end{ex}
319
319
320
320
\begin{ex}
321
-
Build an application to measure the execution time of \texttt{SetEvent} in the following cases:
321
+
As in the \lstinline{ChainTask()} service call, give the location where to start and stop a stopwatch to measure the \texttt{SetEvent} service call duration in the following cases:
322
322
\begin{itemize}
323
323
\item fully preemptive scheduling, setting an event to a higher priority tasks that is not waiting for the event.
324
324
\item fully preemptive scheduling, setting an event to a higher priority tasks that is waiting for the event.
325
325
\item fully preemptive scheduling, setting an event to a lower priority tasks that is not waiting for the event.
326
326
\item fully preemptive scheduling, setting an event to a lower priority tasks that is waiting for the event.
327
327
\end{itemize}
328
328
329
-
Explain how to use the timer functions for each case and explain the results.
330
329
\end{ex}
331
330
332
331
\begin{ex}
@@ -338,13 +337,13 @@ \section{Extended tasks and synchronization using events}
338
337
\item\texttt{t1} prints ``I am t1'' and sets \texttt{evt\_1} of \texttt{server}.
339
338
\end{itemize}
340
339
341
-
Before to run the application, draw a schedule of the execution. Add outputs in the bodies of the task (for instance writes to the LCD or the LEDs) to verify your schedule.
340
+
Before to run the application, draw a schedule of the execution. Add outputs in the bodies of the task to verify your schedule.
342
341
\end{ex}
343
342
344
343
\begin{ex}
345
344
Extend the previous application by adding 2 tasks: \texttt{t2} and \texttt{t3} (priority 1 for both) and 2 events \texttt{evt\_2} and \texttt{evt\_3}. \texttt{server} activates \texttt{t1}, \texttt{t2} and \texttt{t3} and waits for one of the events. When one of the events is set, \texttt{server} activates the corresponding task again.
346
345
347
-
Before to run the application, draw a schedule of the execution. Add outputs in the bodies of the task (for instance writes to the LCD or the LEDs) to verify your schedule.
346
+
Before to run the application, draw a schedule of the execution. Add outputs in the bodies of the task to verify your schedule.
0 commit comments