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

  Package design

Package Design Brief: Assume you are the packaging engineer for a large consumer products company. In this company, the Packaging Design Briefs are initiated by the marketing group and forwarded to the Package Engineering group.

  Mechanical engineering questions

Define dynamic viscosity, Determine the centroid, Pressure due to the height of liquid, Advantage of changing the liquid, Calculate the total moment about the hinge of the seal gate.

  Automatic control

DOF system and Find the differential equation describing the system

  Write a paper on boyle''s law

Write a paper on Boyle's law and describe Compression and Combustion stroke . Also explain Charles's law and illustrate SI engine and CI engine.

  Verify the law for parallelogram of forces

To Verify the law for parallelogram of forces, law for triangle of forces and law of polygon of forces. These laws are very useful to calculate unknown forces in very short time.

  Discharge pressure of the compressor

What is the discharge revised discharge pressure of the compressor.

  The Case for Global Accounting Standards

The role of IFRS in both developing and developed capital markets.

  Wind turbine

Wind turbines are becoming more and more common as a method of energy production, wind turbines by their very nature are dynamic and are subject to and create their own internal and external kinematics and kinetics.

  Advanced design methodologies

8 x product engineering and design review (week 2 – 12), ~3 pages per item which must contain a brief description of the product then delve into concepts such as materials selection, manufacturing methods, life cycle analysis, recyclability and overa..

  Design of absorption column and the cooler

Design of absorption column and the cooler. Process design of other units should be completed along with pipe sizes.

  Determine the maximum total bending moment

Determine maximum total bending moment (static plus dynamic) of the beam under steady-state conditions.

  Force of the water on the gate

Determine the magnitude of the horizontal and vertical components of the force of the water on the gate.

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