0% found this document useful (0 votes)
369 views4 pages

Asses 2

The document describes creating three tasks in FreeRTOS: a "matrixtask" with priority 3 and 1000 stack size, a "communicationtask" with priority 1, minimal stack size, and period of 200ms, and a "prioritysettask" that adjusts the priority of "communicationtask" depending on its execution time. If execution time is over 1000ms, priority is set to 4, and if under 200ms, priority is set to 2. This is done to allow the communication task to run properly, as the high priority matrix task was blocking it due to being computationally expensive. Increasing the communication task's priority allows it to preempt the matrix task and run every 200ms, though this increases

Uploaded by

Yash Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
369 views4 pages

Asses 2

The document describes creating three tasks in FreeRTOS: a "matrixtask" with priority 3 and 1000 stack size, a "communicationtask" with priority 1, minimal stack size, and period of 200ms, and a "prioritysettask" that adjusts the priority of "communicationtask" depending on its execution time. If execution time is over 1000ms, priority is set to 4, and if under 200ms, priority is set to 2. This is done to allow the communication task to run properly, as the high priority matrix task was blocking it due to being computationally expensive. Increasing the communication task's priority allows it to preempt the matrix task and run every 200ms, though this increases

Uploaded by

Yash Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DEVELOPMENT OF REAL-TIME

SYSTEM EIT DIGITAL

ASSIGNMENT -2

NAME: PATEL YASH VIJAYKUMAR


QUESTION
-1. Create a task "matrixtask", Priority: 3, Stack size: 1000
2. Create a task "communicationtask”, Priority: 1, Stack size:
FreeRTOS minimal stack size, Desired
Period: 200 ms,
3 .Create a new task "prioritysettask" which:
1. Sets the priority of "communicationtask" to 4 in case its execution
time is more than 1000
milliseconds (Hint: look at vApplicationTickHook() to measure it)
2. Sets the priority of "communicationtask" to 2 in case its execution
time is less than 200
milliseconds (Hint: look at vApplicationTickHook() to measure it)

SOLUTION :
• Why is "matrixtask" using most of the CPU utilization?
The matrix task is more computationally expensive than the
other tasks, and its priority is higher.
• Why must the priority of "communicationtask" increase in
order for it to work properly?
The matrix task is blocking the communication task from
executing due to it having a higher priority, and that it is
computatuinally expensive, so it takes a while to execute.
Therefore, for communication task to run properly, its must
increase priority, so it can pre-empt the matrixtask.
• What happens to the completion time of "matrixtask"
when the priority of "communicationtask" is increased?
The completion time will increase because it will be
preempted by communication task every 200 msec.
• How many seconds is the period of "matrixtask"? (Hint:
look at vApplicationTickHook() to measure it)
we get a period at about 1.7 sec.

OUTPUT :

You might also like