1 / 31

Real-Time Systems Introduction

Real-Time Systems Introduction. Dr. C.H. Wei Southern Taiwan University of Technology. Real-Time Operating Systems (RTOS) :. Operation System ( 作業系統) Embedded System ( 嵌入式系統) Real Time System ( 即時系統) Real Time Embedded System ( 嵌入式即時系統). 9,000. 8,000. 7,000. 6,000. 5,000. M units.

Download Presentation

Real-Time Systems Introduction

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. Real-Time SystemsIntroduction Dr. C.H. Wei Southern Taiwan University of Technology

  2. Real-Time Operating Systems (RTOS): Operation System (作業系統) Embedded System (嵌入式系統) Real Time System (即時系統) Real Time Embedded System (嵌入式即時系統)

  3. 9,000 8,000 7,000 6,000 5,000 M units 4,000 3,000 2,000 1,000 0 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 4-Bit 8-Bit 16-Bit 32-bit+ History and Future of MCU (1) Over 60億片in 2003 By SEMICO In last 20 years, 8 bits MCU were domestic Application of embedded 32Bits MCU grosses rapidly

  4. $20,000 $15,000 $M $10,000 $5,000 $0 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 4-Bit 8-Bit 16-Bit 32-bit+ History and Future of MCU (2) Total MCU Market (to 200億$) By SEMICO Conclusion: for 8/16/32 bits MCU, 1/3 + 1/3 + 1/3

  5. Start from Z-80 An 8051 for everything (should be CSIC) Use Simulators Education switches to 8/16/32 bits in parallel JTAG ONCE BDM replaces the simulator RTOS should be introduced Need renew platforms for education Problems on MCU Education

  6. POWER KEYPAD LCD DISPLAY MAG CARD READER IC CARD READER Memory & Decoder Real Timer MCU·CORE GSM MODULER IrDA Interface RS232 Interface Thermal Printer Typical Embedded System

  7. allows you to divide an application to multi-tasks; Simplifytheapplication programming: Easier to modify, extend, maintenance Guarantee the system latencyreach or close to the theoretical limits Higher the reliability and system performance Fill the gap between application engineer & expert of Computer Why RTOS?

  8. Races in tasks Died lock priority inversion Reentrancy Communications between tasks …… RTOStakes care of all above problems for you! RTOS is a nice tool for Embedded System You have to LEARNHow to Use It! Multi-Tasks Bring Problems !

  9. Commercial RTOS Products VxWorks Wind RiverSystem $40k/s & royalty wrs.com pSOS Wind RiverSystem wrs.com VRTX Microtec $20K/seat LynxOS $10K/s, Bulue Cat Linux$2.5k/seatlynuxworks.com QNX QNX qnx.com OS-9 Microware Microware.com Nucleus Accelerated Tech. $20K/s with source code CMX 8051Tools Tasking$1.29k Tasking.com RT/Studio IDE Precise $30K psti.com Embedded LinuxGreen Hill$7.9KRoyalty free ghs.com Embedex LinuxLineo $5k/seat lineo.com Redice Linux Redsonic redsonic.com Yellow Dog linux, Hard Hat Linux, Turb LinuxMontavista.com Other: Linuxnews.com LinuxDevices.com Embed.com

  10. The μC/OS Book1992 Licensing: You do not need a license to use this code in your application, if your application is distributed in object format.You should however, indicate in your product literature that you are using μC/OS, the Real Time Kernel.If you distribute μC/OS in source code, you must obtain a license. 

  11. The µC/OS-II Book1998 License policy changed since µC/OS 1.0: You must obtain an Object Code Distribution License to embedded µC/OS-II in commercial product that is sold with the intent to make profit No licensing is required if µC/OS-II is used for education

  12. The 2nd edition of µC/OS-II June 2002 From 498 pages to 606 pages Delete 150 pages source code list. 250 new pages more From 12 Chapters to 18 Chapters Meet Requirement for Safety-Critical System June2003 584 pages

  13. µC/OS (V1.08) vs. µC/OS-II(V2.00)266 page to 498 pages • Add more important functions: • Memory manager • stack usage check • CPU load check

  14. µC/OS-II (V2.00 1998)vs. µC/OS-II(V2.52 2002) “MicroC/OS-II The Real-time Kernel” The Second Edit (2002) Add 250 pages more • Meet Requirement for Safety-Critical System Certified by FAA • Add more important functions: • Mutax Semaphore, Event Flag , Debug…… • Add more explanations • Add Porting and Testing

  15. Real-Time SystemsMar.2000 12 Chapters, 610 pages

  16. Introduction • Reference Model for Real-Time Systems • Scheduling Approaches • Clock-Driven Scheduling • Practical Aspects of Cyclic Executives • Priority-Driven Scheduling • Resource Access • Aperiodic and Sporadic Tasks • Operating Systems Issues • Scheduling in SystemVR4 • Preemption Latency in Linux • I/O Handling in Windows NT/2000 • Data Caching in Real-Time Systems • Real-Time Communication • IETF Integrated Services • Network Calculus Real-Time Systems Jane W.S. Liu

  17. Real-Time SystemsJan.1997 9 Chapters, 448 pages

  18. Introduction. • Characterizing real-time tasks and systems. • Task assignment and scheduling. • Programming languages and tools. • Real-time databases. • Real-time communication. • Fault-tolerance techniques. • Reliability evaluation techniques. • Clock synchronization. • Appendix. Review of modeling techniques. Real-Time Systems C. M. Krishna and K. G. Shin

  19. Real-Time SystemsMar.2001 10 Chapters, 224 pages

  20. Introduction: The World of Real-Time Systems. • Software Architectures. • Requirements and Design Specifications. • Systems of State Machines. • Declarative Specifications. • Deterministic Scheduling. • Execution Time Prediction. • Keeping Time on Computers. • Programming Languages. • Operating Systems. • Appendix: Air Traffic Control System — Project Specifications. Real-Time Systems and SoftwareAlan C. Shaw

  21. Real-Time Concepts for Embedded SystemsJuly 2003 16 Chapters, 294 pages

  22. Real-Time Concepts for Embedded Systems • Introduction • Basics of developing for embedded systems • Embedded system initialisation • Tasks • Semaphores • Message queues • Other kernel objects • Other RTOS services • Exceptions • I/O subsystem • Memory management

  23. µC/OS Already Widely Used in Many Fields • Already used in the field since 1992 such as: • cameras • medical instruments • musical instruments • engine control • Since 1995, ported it to MC68HC11, M68000, CPU32,M.core,HC08 and used it in several projects: • Digital Data Log • MCU based TCP/IP stack • network adapter • highway telephone call box • ATM machine • industrial robots……

  24. µC/OS, µC/OS –IIthe RT Kernel • Dedicated Designed for Embedded System • Priority based preemptive kernel (simple algorithm) • Above 90% is written in C, easy for porting • Scalable and ROM able • Source code for PC environment attached with a CD • Very detail explanation in excellent programming style So good for education!

  25. RTOS Kernel RTOS Kernel Source Code µC/OS-II Service Enter_Critical() Exit_Critical() Schedule_lock() ScheduleUnlock() TaskChangePrio() …... OSSemPost() OSMBoxPost() OSQpost() OSTimetick() OSTaskCreat() OSTaskDell() Dormant Waiting OS_Task_SW() OSInit() OSStart() Running Pending ISR OSSemPend() OSMBoxPend() OSQPend() OSTimeDly() IntEnter() IntExit()

  26. Available Compilers • Diab data (now part of Windriver) • ANSI-c / c++ • Platforms: windows 95, windows NT, OS/2, Solaris, SunOS, HP/UX, IRIX, aix, • Http://www.WindRiver.Com/products/html/dcc_compiler.Html • Green hills • Standard C++, extended embedded C++ • Host platforms: windows 95, 98, NT and sparc/solaris • Http://www.Ghs.Com/products/mcore_development.Html • Hiware • ANSI-C / C++ / EC++ / cc++ compilers • Host platforms: windows 95, 98, NT • Http://www.Hiware.Com/p_mcore.Html • Metrowerks • ANSI C compliant, ANSI/ISO C++ compliant and EC+ compilers • Host platforms: windows 95, 98 and NT • Http://www.Metrowerks.Com/embedded/mcore/ • Motorola GNU toolkit • GNU C and C++ compilers • Http://sarl.Corp.Mot.Com/mcore/gnu/

  27. Free C Compile: GNU gcc Tolls • GNU gcc Tools • Cross C Compiler for: • M68K, CPU32, Coldfire, M.Core, PowerPC, 68HC11/12,SPARC,PA,RISC,VAX,AMD29K, ARM,Thumb,MN10xxx, M32, SR6000,MIPS, • RT, i386, Inter960,TMS32, DEC alpha, V850,NS32K • Cross assembler : AS • Disassemble: Objdump • Liker: Ld • C support lib: Libc & Libm • Gcc Debug options • You knowGCC , You will get also EmbeddeducLinux

  28. Porting µC/OS –II • Compiler with Hiware • Down loaded with Picobug Or: • Compiler with CodeWarrior • Down loaded with EDBI tool

  29. uCLinux in Linux • Take off the Memory Management • Good for the non-mmu CPU in Embedded • Free OS for Embedded • Many application program in Linux available • Not a Real Time OS!Download RTLinux3.1 from:www.rtlinux.org • Much smaller than Linux, sometimes still too large for Embedded system typical RAM usage ~512K • Down load from: www.uclinux.org

More Related