Answered step by step
Verified Expert Solution
Link Copied!

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 real-time OS on some computer controlling an autonmous train operating in
Vermont. The computer running this OS uses interrupts to interact with devices; it has 8 priority
levels, 0..7, with 7 the highest priority. One of the hard real-time requirements is that when a cow
event is detected, i.e., a foreign body of significant size on the tracks, the code that decelerates the
train must begin executing not later than 20 ms after detection, and finish executing not later than
1600 ms after detection. The handler, itself, needs 1340 ms to run. The detection is made known
first to the CPU via a priority 7 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 7 interrupt to handle. If the OS takes
14 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 general-purpose 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 250 ms. For a worst-case
plan (i.e., page fault(s) all take the maximum time), how many page faults can be tolerated and
have the handler still meet its finish-by deadline?
(c) If the train is moving at 60 mph when the event is first detected, how far does it move in the 20
ms before the handler begins executing? (or, if you prefer, suppose the train is moving at 100
kph). Remember to provide correct units with your answer.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

Students also viewed these Databases questions

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago