1 / 31

Application of EPICS 3.14 on Linux

Application of EPICS 3.14 on Linux. Beijing EPICS Seminar Tuesday, 8/21 2002 J.Odagiri. Contents. Application of Linux IOC Hardware support is not matured yet Still, Linux IOC is useful in some cases Hard real-time support Linux is not real-time OS Linux on RTOS for EPICS.

gcharlotte
Download Presentation

Application of EPICS 3.14 on Linux

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. Application of EPICS 3.14 on Linux Beijing EPICS Seminar Tuesday, 8/21 2002 J.Odagiri

  2. Contents • Application of Linux IOC • Hardware support is not matured yet • Still, Linux IOC is useful in some cases • Hard real-time support • Linux is not real-time OS • Linux on RTOS for EPICS

  3. Application of Linux IOC • Linux IOC for • Purely soft records • Network devices • Alternative of PCAS • Graphics processing

  4. Lots of Network Devices Linux IOC with EPICS 3.14 PLCs AIO/DIO Controllers Custom Embedded Controllers Network

  5. Network Devices to be used

  6. Never want many drivers Record Support FA-M3 MELSEC CVM1 … Device Support Library Network IO Driver

  7. Network I/O driver Queue I/O task Command Notify Response Scan task Seq task CA task

  8. Things to be considered • Some use TCP and others use UDP • Concurrent processing on the device side • Some of the latest PLCs operate with multi-tasking OS • Device driven I/O • Event Notification • Local Scanning and Reporting • …

  9. An Alternative of PCAS Acc control Network Utility Facility Control System Lab Network Linux IOC with EPICS 3.14

  10. “Virtual Shared Memory” Cannel Access Run-time Database Record Support Utility Facility Control System Device Support Mapped Data Table TCP/IP Client Data Server

  11. Some Comments • Time-stamps of the records do not show the time the data were born • To avoid additional delay • TCP/IP Client calls post_event() just after it refreshes the data table • TCP/IP Client must be implemented as a member of the threads of the iocCore • The system is almost completed and expected to be in operation in a month

  12. Beam Profile Processing Graphics Processing on Windows PC + Portable CA Run-time DB on VME IOC Network

  13. “Multi-media” is for Linux Graphics Card with Linux driver + Graphics Packages for Linux + Device Support Linux IOC with EPICS 3.14 (CompactPCI ?)

  14. Contents • Application of Linux IOC • Hardware support is not matured yet • Still, Linux IOC is useful in some cases • Hard real-time support • Linux is not real-time OS • Linux on RTOS for EPICS

  15. Latency in Linux Kernel Non-preempt-able Kernel ( tens of ms ) Interrupt Disabling ( hundreds of ms ) Address Space Switching ( tens of ms )

  16. Non-preemptive Kernel Interrupt Latency Kernel High Priority Process Low Priority Process

  17. Interrupt Disabling unsigned long flags; save_flags(flags); cli(); /* critical section */ restore_flags(flags);

  18. Address Space Switching x86 CR3 User Space Each Process has Kernel Space mapping RT-task RT-task Kernel Space

  19. Solutions • Preempt-able Kernel • Developed by MontaVista people • Linux 2.6 is to adopt this technology • RTLinux • Developed by V.Yodaiken et.al. • They hold the patent on their method

  20. Preempt-able Kernel Interrupt Latency Kernel High Priority Process Low Priority Process

  21. Preempt-able Linux kernel • How can it be done? • Redefining SMP spin-lock to mutex for multiple processes on a single processor • Suffers from the other two obstacles • Latency: less than some ms in most of the cases

  22. I’m listening to nice music • I may lose my mood if • the instruction register gets an instruction from a part of the kernel never covered in prior tests • the telephone starts ringing • my child starts crying

  23. I’m taking off into the air • I may lose my life if • the instruction register gets an instruction from a part of the kernel never covered in prior tests • a private jet crosses my route • the engine starts crying

  24. Architecture of RTLinux Process Process task task Linux scheduler Real-time scheduler

  25. Architecture of RTLinux Linux task task task Real-time scheduler

  26. Architecture of RTLinux User Space Process Process task task Kernel Space Linux scheduler Real-time scheduler

  27. Architecture of RTAI Process Process task task Linux scheduler Real-time scheduler

  28. Hard real-time mode Process Process task task Linux scheduler Real-time scheduler

  29. Soft real-time mode Process Process task task Linux scheduler Real-time scheduler

  30. Can be a mixture of both Process Threads task task Linux scheduler Real-time scheduler

  31. Conclusions • Linux IOC is useful for • Network devices • An alternative of PCAS • Graphics processing in EPICS • You may be able to benefit from • Soft real-time support some time soon • Hard real-time support some unpredictable time soon … or late

More Related