1 / 13

BASIC DESIGN USING REAL TIME OPERATING SYSTEMS

BASIC DESIGN USING REAL TIME OPERATING SYSTEMS. OVERVIEW PRINCIPLES EXAMPLES ENCAPSULATION OF SEMAPHORES AND QUEUES HARD REAL-TIME SCHEDULING CONSIDERATIONS SAVING MEMORY SPACE SAVING POWER. Response to status requests sent to network hardware. Interrupt Routine.

sizemore
Télécharger la présentation

BASIC DESIGN USING REAL TIME OPERATING SYSTEMS

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. BASIC DESIGN USING REAL TIME OPERATING SYSTEMS

  2. OVERVIEW PRINCIPLES EXAMPLES ENCAPSULATION OF SEMAPHORES AND QUEUES HARD REAL-TIME SCHEDULING CONSIDERATIONS SAVING MEMORY SPACE SAVING POWER

  3. Response to status requests sent to network hardware Interrupt Routine Message passed through RTOS Other tasks activity Received frames DDP Protocol Task Frames that are not addressed to telegraph are discarded. Interrupt Routines receives serial data Frames addressed to telegraph Response to status requests ADSP Protocol Task determines if frame is print data Print data sent to serial port. Receive data New stats Serial port Task determines if serial data contains new status Print data

  4. WRITE SHORT INTERRUPT ROUTINES The system must respond to commands that are coming from a serial port. Commands always end with a carriage return Commands arrive one at a time the next command will not arrive until the first command finishes. The serial port hardware can only receive and store only one character at a time and characters may arrive quickly. The system can respond to commands relatively slowly.

  5. HOW MANY TASKS With more tasks you have better control of relative responses. If more tasks are there they can be given priorities and they run on priority basis. With more tasks the system can be modular. With more tasks the system can encapsulate data more effectively. With more tasks obviously more data is shared among the tasks. With more tasks more likely to have passes messages and shared data. Each task requires stack, therefore for more tasks more memory required for stack.

  6. Each time mp switches between tasks certain amount of time evaporates in saving the context of the task an so on. More tasks means more calls to RTOS.

  7. A SEMAPHORE TASK HELPS CONTROL SHARED HARDWARE Paper handling task Display task makes decisions about what to display Button handling task PRINTER MELTDOWN

  8. Tank monitoring system Alarm & bell Floats and thermometers in a tank

  9. TASK MONITORING DESIGN Float interrupt routine Legend: Solid line: Message passed through RTOS Dotted line : Other task activity Timer interrupt routine Float levels Float reading module Buttons Float levels Requests Level calculation task Over flow detection task Warnings Button interrupt routine Gasoline level data module Warnings Button command task Display task Prompts Printer interrupt routine Printer formatting task Hardware Displays Task – 2 is leaking!!

  10. Encapsulating Semaphores and Queues

  11. Hard real Time Scheduling Considerations Hard real time systems it is important to write subroutines that always execute in the same amount of time or that have a clearly identifiable worst case. Fixed sized buffers whose allocation routine runs in the same amount of time. Tasks that avoid semaphores for data protection are preferable since their worst case performance did not depend on the characteristics of the every other task that uses the semaphore.

  12. SAVING MEMEORY SPACE Make Sure That no two functions does the same task. Eg. Memcopy and memmove functions Find out from the results which of the functions are quite frequently are in use and retain those functions and use the same function to the other related tasks so that memory space can be saved. Check that your development tools are not sabotaging you. Configure your RTOS to contain only those functions that you need. Look at the assembly language instructions that are created by the cross compiler to see if certain of your C statements translate into huge numbers of instructions.

  13. SAVING POWER Embedded systems run on battery in order to preserve the battery it is customary to turn of the power for the modules which are not in function. common method to turnoff the power is to use timer circuits. Another method is to turn of the microprocessor in executing the instructions but on boar terminals continue to operate. We use interrupt mechanism to turn on the microprocessor in order to resume the task. Another method is to turn of the entire system and when ever it is needed turn on the system so that power can be saved.

More Related