System that employs a preemptive real-time os

Assignment Help Mechanical Engineering
Reference no: EM131090254

Consider a system that employs a preemptive real-time OS. There are multiple threads that need to update a shared LCD display. Consider this example with two foreground threads (thread1 thread2) and one background thread (isr) that all output to a three-line LCD. Free is a global variable, initialized to 1.

2446_f8835e2a-852f-452b-b704-a1ba0bc6130f.png

The first parameter of Display is the line number, and the second parameter is a 16-bit number. You may call the two LCD_GoTo LCD_OutDec functions without writing them. Your Display function will effectively perform the following (this program has a critical section).

735_e8200bee-b765-4862-bb91-12148172fe6e.png

Rewrite this Display function to remove the critical sections. You CANNOT disable interrupts at all. You should not introduce new critical sections. You CANNOT allow threads to block or spin. If the LCD is busy, then the output is simply skipped. You may not change the thread code or the Display function prototype. Basically you will add software to this existing Display function, but not thread1, thread2, or isr.

Reference no: EM131090254

Questions Cloud

What are two pros and two cons of the trade barriers used : What are the main goods and services the United States traded internationally? What trade barriers were in place during that decade? What are two pros and two cons of the trade barriers used?
What is the maximum amount of good : What is the maximum amount of good Y that can be purchased if X and Y are the only two goods available for purchase and PX = $10, PY = $15, X = 30, and M = 600? (Note: X is the quantity of good X purchased and M is Income)
How to understand economic inequality : How to understand economic inequality? how to measure economic inequality ? what's the role of government to solve the problem inequality?
Explain why for a perfectly competitive market : Explain why, for a perfectly competitive market, long run equilibrium implies zero economic profits. and Does this mean zero accounting profits? Explain.
System that employs a preemptive real-time os : The first parameter of Display is the line number, and the second parameter is a 16-bit number. You may call the two LCD_GoTo LCD_OutDec functions without writing them. Your Display function will effectively perform the following (this program has..
Defend a philosophy of ethical practice : Ethical Considerations - This category focuses on the integration of ethical principles with professional practice in my field of business, "topic the use of service-service technology. Defend a philosophy of ethical practice using discipline-spec..
Discussion about to poetic terminology : Choose ONE poem from the textbook and write a 750-1000 word explication of this poem. Your final product should be an essay (with an introductory paragraph including thesis, supporting paragraphs, and a conclusion, not a worksheet/list.
What is the name of the boundary in the solar nebula : What is the name of the detailed theory that describes how our solar system formed from a cloud of interstellar gas and dust and What is the name of the boundary in the solar nebula beyond which ices could condense?
How accurate was the forecast : On the day predicted, record those same data. Post the actual weather in the discussion board, including the original prediction. How accurate was the forecast? If it wasn't accurate, what do you think caused the weather to vary from the predic..

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  Applying the method of sections to trusses

Explain the difference between applying the Method of Sections to trusses and applying it to beams.

  In a spring mass system a 1kg block is dropped from a

in a spring mass system a 1kg block is dropped from a height of 1 meter on top of a spring with a spring constant k

  Methane is completely burned

Methane is completely burned with 20% excess air, with 30% of the carbon going to CO. What is the partial pressure of the CO in the stack gas if the barometer reads 740 mm Hg, the temperature of the stack gas is 300°F.

  20 saturated liquid water by volume at a temperature of

a tank having a volume of 0.05m3 contains 80 saturated vapor and 20 saturated liquid water by volume at a temperature

  Show the trajectory is a circle with radiusr= mv/qb = v/w

Choose the z-axis to lie in direction of B and let the plane containing E and B be the yz-plane.

  Sketch the graphs of both f (t) and the periodic function

Sketch the graphs of both f (t) and the periodic function

  Velocity and radius of curvature

Strategy formulation presupposes a set of objectives and goals.

  Breaking mechanism that binds the cars

As the large ring rotates, the operator can apply a breaking mechanism that binds the cars to the ring, which then allows the cars to rotate with the ring. Assuming the passengers are not belted into the cars, determine the smallest speed of the r..

  Verify your finite difference code solution against a

develop a one-dimensional transient numerical solution for a plane wall of a nuclear containment vessel. the external

  A bathroom door which is 091 m wide and 213 m high is

a bathroom door which is 0.91 m wide and 2.13 m high is equipped with a torsional spring and a torsional rotational

  Calculate the pressure at the nozzle exit

Moist air at 35 degree C, 3 bar, and relative humidity 30% (State 1) enters a nozzle with a velocity of 50 m/s and expands in a reversible and adiabatic process such that the moist air leaving the nozzle is about to condense (State 2). Calculate the ..

  Consider a continuous-time lti system

Consider a continuous-time LTI system with the input-output relation given by y (t) = t e -(t -T)X (T) dT-00

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd