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

  Determine the corresponding heat rate-surface temperatures

The outer surfaces are exposed to ambient air, with T8,2 = 25°C and h z = 4 W/m2 · K. while hot oil flowing through the hole is characterized by Tx.1 = 300°C and h1 = 50 W/m2 · K. Determine the corresponding heat rate and surface temperatures.

  Draw schematics of a heat engine and b refrigeration

draw schematics of a heat engine and b refrigeration devices. label the reservoirs the type of energy transfer and the

  Determine the rate of heat transfer kw to the high

a system that operates in a reversible cycle receives energy by heat transfer from a 24.8oc reservoir at a rate of 25.5

  Show the process on a p-v diagram and calculate the thermal

a system consists of 2kg of co2 gas initially at state 1 where p11 bar and t1300k. the system undergoes a power cycle

  What is the area of research

you must explicitly state your research questions and summarise your proposal and rationale. Your introduction must contain the following information: a brief outline of the topic being addressed in this work.

  What is free-stream dynamic pressure for this test condition

You are working as a flight-test engineer at the Dryden Flight Research Center. During the low-speed phase of the test program for the X-37, you know that the plane is flying at an altitude of 8 km. The pressure at gage 1 is 1550 N/m2, gage; the pres..

  What error in the pressure drop would ensue if the

water is flowing turbulently at a mean velocity of um10 fts in a 1.0 - in. i.d. horizontal pipe and the fanning

  Write a function that accepts an array a as input and

write a function that accepts an array a as input and searches the contents of the array for elements in three

  Is a probate estate subject to income tax

How does the gross estate differ from a probate estate What determines whether an item passes to heirs outside the probate process? Are there items subject to estate tax that are not subject to income tax? Why or why not? Is a probate estate subje..

  Determine the depth h of the mercury inside the box if the

a rectangular boat the horizontal sides are l each the depth is h l2 is made of a think weightless walls and partially

  Rotate turbine blades without any fluid

Is it possible to rotate turbine blades without any fluid means there is no requirement of water or air to rotate turbine blade.

  Kinetic and potential energy effects are negligible

h2o as saturated liquidvapor mixture enters a counterflow heat exchanger operating at steady state at 0.7 bar with a

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