Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. Suppose you have a real - time OS on some computer controlling an autonmous train operating in Vermont. The computer running this OS uses
Suppose you have a realtime OS on some computer controlling an autonmous train operating in
Vermont. The computer running this OS uses interrupts to interact with devices; it has priority
levels, with the highest priority. One of the hard realtime requirements is that when a cow
event is detected, ie a foreign body of significant size on the tracks, the code that decelerates the
train must begin executing not later than ms after detection, and finish executing not later than
ms after detection. The handler, itself, needs ms to run. The detection is made known
first to the CPU via a priority interrupt.
a Assume the CPU has just finished an instruction, so is checking if there are any pending higher
priority interrupts and so instantly sees there is a priority interrupt to handle. If the OS takes
ms to save the current process context before beginning the handler for the interrupt, and
then x ms to switch to and begin executing the handler, what is the largest permitted value for
x if the start deadline is to be met?
b Suppose someone in management made a poor decision and chose to implement this realtime system on a generalpurpose OS that uses virtual memory. This computer uses an ssd as
opposed to a hard drive The maximum time to service a page fault is ms For a worstcase
plan ie page faults all take the maximum time how many page faults can be tolerated and
have the handler still meet its finishby deadline?
c If the train is moving at mph when the event is first detected, how far does it move in the
ms before the handler begins executing? or if you prefer, suppose the train is moving at
kph Remember to provide correct units with your answer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started