1 / 10

Chapter 2 Real-time software design

Chapter 2 Real-time software design. Lab 02 (Software Engineering 8 th Ed. Chapter 15). Objectives. To explain the concept of a real-time system and why these systems are usually implemented as concurrent processes To describe a design process for real-time systems

varden
Download Presentation

Chapter 2 Real-time software design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2Real-time software design Lab 02 (Software Engineering 8th Ed. Chapter 15)

  2. Objectives • To explain the concept of a real-time system and why these systems are usually implemented as concurrent processes • To describe a design process for real-time systems • To explain the role of a real-time operating system • To introduce generic process architectures for monitoring and control and data acquisition systems

  3. Real-time systems • Systems which monitor and control their environment • Real-time system • Software system where the correct functioning of the system depends on the results produced by the system and the time at which these results are produced • Soft real-time system • Operation is degraded if results are not produced according to the specified timing requirements • Hard real-time system • Operation is incorrect if results are not produced according to the timing specification • Inevitably associated with hardware devices • Sensors • Collect data from the system environment • Actuators • Change (in some way) the system’s environment • Time is critical • Real-time systems MUST respond within specified times.

  4. Question 1 • Explain why an object-oriented approach to software development may not be suitable for real-time systems.

  5. Design process of real-time systems • Process • Identify the stimuli to be processed and the required responses to these stimuli • For each stimulus and response, identify the timing constraints • Aggregate the stimulus and response processing into concurrent processes • A process may be associated with each class of stimulus and response • Design algorithms to process each class of stimulus and response • These must meet the given timing requirements • Design a scheduling system which will ensure that processes are started in time to meet their deadlines • Integrate using a real-time operating system

  6. Real-time operating systems (real-time executives) Real-time clock. Provides information for process scheduling. Interrupt handler. Manages aperiodic requests for service. Scheduler. Chooses the next process to be run. Resource manager. Allocates memory and processor resources. Despatcher. Starts process execution. Figure 15.4 Components of a real-time operating system

  7. Monitoring and control and data acquisition systems • Monitoring systems examine sensors and report their results • Control systems take sensor values and control hardware actuators • Acquisition systems collect data from sensors for subsequent processing and analysis

  8. Question 2 • Draw a state machine model of the control software of a compact disk player. States include: • Idle • Ready • Door close • Door open • Ready to play • Disk playing • Track selecting

  9. Question 3 • A train protection system automatically applies the brakes of a train if the speed limit for a segment of track is exceeded or if the train enters a track segment that is currently signalled with a red light (i.e., the segment should not be entered). Details are shown in Figure 15.15. Identify the stimuli that must be processed by the on-board train control system and the associated responses to these stimuli. • If a periodic process in the on-board train protection system is used to collect data from the trackside transmitter, how often must it be scheduled to ensure that the system is guaranteed to collect information from the transmitter? Explain how you arrived at your answer.

  10. Question 3 (cont’d) • The system acquires information on the speed limit of a segment from a trackside transmitter, which continually broadcasts the segment identifier and its speed limit. The same transmitter also broadcasts information on the status of the signal controlling that track segment. The time required to broadcast track segment and status information is 50ms. • The train can receive information from the trackside transmitter when it is within 10m of a transmitter. • The maximum train speed is 180kph. • Sensors on the train provide information about the current train speed (updated every 250ms) and the train brake status (updated every 100ms). • If the train speed exceeds the current segment limit by more than 5kph, a warning is sounded in the driver’s cabin. If the train speed exceeds the current segment speed limit by more than 10kph, the train’s brakes are automatically applied until the speed falls to the segment speed limit. Train brakes should be applied within 100ms of the time when the excessive train speed has been detected. • If the train enters a train segment that is signalled with a red light, the train protection system applies the train brakes and reduces speed to zero. Train brakes should be applied within 100ms of the time when the red light a signal is received. • The system continually updated a status display in the deriver’s cabin. Figure 15.4 Components of a real-time operating system

More Related