CPRE-558-HW1
pdf
keyboard_arrow_up
School
Iowa State University *
*We aren’t endorsed by this school
Course
558
Subject
Industrial Engineering
Date
Dec 6, 2023
Type
Pages
20
Uploaded by BarristerPencilLobster30
CPR E 558 HW1
Submitted by: (Section 1)
Hounandan Ravichandran - nandan35@iastate.edu
Mani Kanta Lokesh Buragadda - bmlokesh@iastate.edu
Question A:
1)
Two Real-Time Operating System
a)
Two popular Real time Operating Systems(RTOS):
i)
FreeRTOS
ii)
VxWorks
iii)
Both these RTOS are used for various applications which require
deterministic predictable behavior in terms of response time and task
scheduling.
(1)
Some of the Real-time applications:
(2)
Embedded systems
(3)
IOT Devices
(4)
Aerospace
(5)
Military Defense
(6)
Consumer electronics
(7)
Medical Devices
(8)
Networking
iv)
Scheduling Algorithms used in VxWorks: It supports two scheduling
algorithms a basic pre-emptive priority one and a round-robin algorithm.
v)
By default, FreeRTOS uses a “Fixed-priority” preemptive scheduling
policy, with round-robin time slicing of equal priority task.
Fixed-priority means the scheduler will not permanently change the priority of a
task, boosts the priority of a task temporarily due to priority Inheritance.
Preemptive scheduler runs the highest priority a RTOS tasks, regardless of when
a task is ready to execute.
Robin hood: each tasks of same priority takes turns entering the running state.
FreeRTOS Scheduling algorithm has three configurations
Single core (Default)- fixed-priority preemptive scheduling
Asymmetric multicore (AMP)- each core has its own single core scheduling
algorithm.
Symmetric multicore (SMP) -scheduling policy uses the same algorithm as the
single-core scheduling policy but, unlike the single-core and AMP scenarios,
SMP results in more than one task being in the Running state at any given time.
2)
Real world application:
Static real-time system with hard deadlines:
Example: Missile Defense
a)
Justification: An air-defense system that is monitoring the sky for an incoming
enemy missile. Due to the nature of the application the timing constraints and this
imposes several deadlines on other tasks like detecting, identifying, engage, or
launching an intercept missile to tackle.
b)
Immediate Threat Response: Incoming missiles can travel at incredibly high
speeds, leaving only seconds to react.
c)
Precision and Accuracy: Missile defense systems rely on sophisticated sensors,
radar, and tracking systems to detect and intercept incoming threats accurately.
d)
National Security: The stakes in missile defense are exceptionally high, as the
protection of a nation's citizens and infrastructure depends on timely responses.
e)
Reliability: Static real-time systems are designed with predictability and
reliability in mind.
f)
Continuous Monitoring: These systems continuously monitor airspace for
potential threats, and hard deadlines ensure that the system remains vigilant
around the clock, ready to respond instantly when necessary.
Dynamic Real-time System with Both Periodic and Aperiodic Tasks with Hard Deadlines.
Example: Airplane Sensor and Autopilot Systems.
g)
Safety-Critical Operations: Navigation, collision avoidance, and stability control
are among the crucial tasks that airplane sensor and autopilot systems are in
charge of. Setting strict timelines is essential to ensuring that these systems react
quickly and correctly to changing circumstances, guaranteeing passenger safety.
h)
Periodic Tasks: In aviation, periodic tasks involve gathering sensor data at
predetermined intervals, such as altitude, airspeed, and attitude. To ensure that
these data points are gathered and processed consistently and to enable precise
flight control and monitoring, strict deadlines are established.
i)
Aperiodic jobs: Aperiodic jobs, such as reacting to abrupt changes in weather or
air traffic, need for rapid attention. Hard deadlines guarantee that the autopilot and
control systems can quickly respond to unforeseen circumstances, assisting the
aircraft in navigating turbulence, avoiding crashes, or handling crises.
j)
Predictability: In aviation, predictability and reliability are paramount. Dynamic
real-time systems with hard deadlines provide a clear framework for task
scheduling, minimizing the risk of task overruns or delays that could compromise
flight safety.
k)
Redundancy and Fail-Safe Mechanisms: These systems often incorporate
redundancy and fail-safe mechanisms to ensure reliability. Hard deadlines help
maintain the integrity of these mechanisms, ensuring that backup systems are
activated promptly when needed.
Dynamic real-time system with soft deadlines.
Example: Smart Home Automation.
l)
By giving consumers control over different elements of their home environment,
including lighting, temperature, and appliances, smart home automation systems
are intended to improve convenience, energy efficiency, and security within a
family.
m) User Convenience: Simplifying and improving everyday life is the main objective
of smart home automation. When they offer requests, like turning on the lights or
regulating the temperature, users anticipate prompt replies. The occasional delay
in command execution won't have a significant impact on these systems though.
n)
Robustness: Redundancy and fail-safes are frequently used in the design of smart
home systems. of the event of a delay or interruption of one component or
communication channel, the system can continue operate utilizing alternate
channels.
o)
Security: A key component of smart home automation is home security systems.
The overall state of security is often not compromised by tiny delays in getting
notifications or activating security measures, even if real-time monitoring and
quick response to security events are essential.
Question B:
1)Precedence Task Relationship:
A.
Two tasks (one for each camera) dedicated to image acquisition, whose objective is to
transfer the image from the camera to the processor memory,they are identified by
acq1
and acq2
;
B.
Two tasks (one for each camera) dedicated to low-level image processing, typical
operations performed at this level include digital filtering for noise reduction and edge
detection; we identify these tasks as
edge1 and edge2
.
C.
A task for extracting two-dimensional features from the object contours,it is referred as
shape
.
D.
A task for computing the pixel disparities from the two images,it isreferred as
disp
.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
E.
A task for determining the object height from the results achieved by the disp task, it is
referred as
H
.
F.
A task performing the final recognition, it is referred as
rec.
> Precedence graph
2)
> Task A: These tasks are likely to be periodic or aperiodic, depending on the rate at which
images need to be captured. If images are captured at regular intervals, they can be considered
periodic.
> Task B: These tasks can be considered aperiodic, as they process images as they become
available.
> Task C: This task is likely aperiodic, as it processes image data and extracts shape features
when required.
> Task D: This task is likely aperiodic, as it computes pixel disparities when new images are
acquired.
> Task E: This task is likely aperiodic, as it computes object height when pixel disparities are
available.
Task F (Final Task): Type: This task can be considered aperiodic, as it performs final recognition
when the shape and height information is ready.
Question C:
1)
What tasks missed their deadlines?
●
Temperature controls - Inspite of reducing it through the dashboard, the system did not
consider the change from the user.
●
Volume Controls - Same. The system did not reduce the volume
●
Windshield wiper controls
●
Brake and Engine Controls
2)
Why were these deadlines missed?
●
With reference to the article, the hackers altered the Uconnect's Head unit Firmware, such
that they can give their own commands to the CAN network of the car.
●
The hackers injected scripts that override the existing control mechanics (that follows the
correct deadline) and ran a new one with no constraints on the deadline - Resulting in
Zero feedback from the system when altered the controls through the
Dashboard(Temperature, Volume etc).
3)
Is the article describing a soft, firm or hard real-time system?
●
This is a classic Hard Real-Time System (Even prof used this example in our class)
4)
Briefly describe three things that you would change and why?
●
Firstly, Isolating the Wireless connected systems with the Critical Driving System.
○
WHY? - If we achieve this, the hacker could worst possibly able to view the
system metrics - but cannot run commands that alter the his/her commands to the
car's Critical Driving System.
●
Secondly, Enabling Agile testing, bug fixing and over-the-air (OTA) updates from the
manufacturer.
○
WHY? - With new features dropping often, it is very crucial for auto
manufacturers to vigorously test the system for bugs and fix them.
○
To push the patches containing the bug fixes, it will be practically easier for the
manufactures to use OTA instead of physically connecting to every car for patch
releases regularly.
●
Finally, Having a machine learning algorithm to detect any penetration in the system
○
WHY? - If we could detect the intrusion beforehand, we could cut-off the
connection with the hackers - making sure that no further damage is done. More
like a Fail-Safe mechanism.
5)
Is Andy's system a type of static system or a dynamic system? Why?
●
Definitely Dynamic System.
○
Why? - Anything could happen while operating a car.
○
In our case, despite of physical harm from outside of the car, the danger came
from the software inside the car - which the designers did not predict to be
happening during design time.
Question D
:
1)
What are the major Findings?
a)
The Author has experimented with both RMS and EDF to break some
misconception among the both with respect to Implementation Complexity,
Runtime overhead, Jitter, etc,.
b)
He says that RMS can be a best fit for general purpose system without critical
constraints.
c)
He also says that EDF can be a suitable option for designing mission and safety
critical applications that will take the full potential of the CPU under resource
constraints.
2)
RMS and EDF - Strength and Weakness:
a)
Implementation Complexity:
i)
RMS has the advantage here by making use of the ready queue into
several FIFO entries for tasks with respect to priority levels.
ii)
In EDF, the deadline changes from task to task, and so are the priority
levels. This adds more complexity compared to RMS.
b)
Runtime Overload
i)
EDF has a lower number of pre-emptions - because a task with a long
period could have an absolute deadline shorter than that of a task with a
smaller period.
ii)
That is not the case with RMS - tasks with small periods always preempt
tasks with longer periods, independently of their absolute deadlines.
c)
Robustness during workload
i)
Under permanent workload conditions (explained in the paper with
Cervin's theorem 1 on page 15), both EDF and RMS are predictable.
ii)
But, to find which is effective -it is based on the application.
d)
Jitter
i)
With respect to Cervin's Theorem 2, EDF's jitter/latency is less than or
equal to RMS.
ii)
The above statement is proved in the paper on page 18 and 19, where EDF
treats tasks more evenly, and there is a significant reduction in the jitter.
e)
Aperiodic task handling:
i)
Normally, EDF has a better time response when handling aperiodic tasks
than RMS.
ii)
If RMS is used with the Slack Stealing algorithm, the response time
improves. However, it can't be guaranteed.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Question E:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Question F:
Question F: 2. Schedule Diagram:
Question F: 3: LLF:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Question G:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help