ICS – Software Engineering Group 1 The SNS General Time Timestamp Driver Sheng Peng & David Thompson.

Slides:



Advertisements
Similar presentations
Lecture 1: Logical, Physical & Casual Time (Part 2) Anish Arora CSE 763.
Advertisements

1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
Time in Distributed Systems
Channel Access Enhancements J. Hill. R3.14 Enhancements Large array support in the portable server –nearly complete –a priority for SNS Port syntax for.
1. Explain why synchronization is so important in distributed systems by giving an appropriate example When each machine has its own clock, an event that.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
Chapter 1 and 2 Computer System and Operating System Overview
Event Context Information: Particle Data Run Information Platform, Run ID, TimeStamp Configuration Information Hardware and software configuration keys.
Chapter 1 and 2 Computer System and Operating System Overview
Operating System Organization
Target Controller Electronics Upgrade Status P. Smith J. Leaver.
Composition Model and its code. bound:=bound+1.
RAID Redundancy is the factor for development of RAID in server environments. This allows for backup of the data in the storage in the event of failure.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
SNS Integrated Control System EPICS Collaboration Meeting SNS Machine Protection System SNS Timing System Coles Sibley xxxx/vlb.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Redundancy. 2. Redundancy 2 the need for redundancy EPICS is a great software, but lacks redundancy support which is essential for some highly critical.
SNS Integrated Control System SNS Timing Master LA-UR Eric Bjorklund.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Status of NA62 straw electronics and services Peter LICHARD, Johan Morant, Vito PALLADINO.
Gregory PawloskiAugust 22, 2002 MPC Testing Progress.
ICS – Software Engineering Group 1 GeneralTime Proposal Status at SNS and Ideas for EPICS base David Thompson Sheng Peng Kay-Uwe Kasemir.
IBM OS/2 Warp Mike Storck Matt Kerster Mike Roe Patrick Caldwell.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
General Time Update David Thompson Epics Collaboration Meeting June 14, 2006.
Software Status Sonja Vrcic Socorro,
SNS Integrated Control System Timing Clients at SNS DH Thompson Epics Spring 2003.
Time Management.  Time management is concerned with OS facilities and services which measure real time, and is essential to the operation of timesharing.
Basic Input/Output System
An OBSM method for Real Time Embedded Systems Veronica Eyo Sharvari Joshi.
Operating System Principles And Multitasking
Timing Requirements for Spallation Neutron Sources Timing system clock synchronized to the storage ring’s revolution frequency. –LANSCE: MHz.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
EPICS EPICS Collaboration Meeting Argonne National Laboratory drvTS improvements for soft timing EPICS Collaboration Meeting Argonne National Laboratory.
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
Fast Fault Finder A Machine Protection Component.
1 Root-Cause VoIP Troubleshooting Optimizing the Process Tim Titus CTO, PathSolutions.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
1 Timo Korhonen & Babak Kalantari PSI, Villigen, Switzerland 1. drvTS revisited 2. Wishlist 3. Current status 4. Proposal Updating IOC Time Capabilities.
Trigger Meeting: Greg Iles5 March The APV Emulator (APVE) Task 1. –The APV25 has a 10 event buffer in de-convolution mode. –Readout of an event =
The recent history and current state of the linac control system Tom Himel Dec 1,
EPICS EPICS Collaboration Meeting Argonne June 2006 IOC Redundancy: Redundancy Monitor Task EPICS Meeting - Redundancy Argonne, June 16, 2006 Matthias.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Adding a Hard Drive. BIOS / UEFI The Unified Extensible Firmware Interface (UEFI) defines a software interface between an operating system and platform.
Controls Zheqiao Geng Oct. 12, Autosave Additions/Upgrades and Experiences at SLAC Zheqiao Geng Controls Department SLAC National Accelerator Laboratory.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
POST and The Boot Process
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Hardware Preventative Maintenance: Eliminating issues, extending longevity, and ensuring quality hardware.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Computer Technician POST and The Boot Process ©UNT in Partnership with TEA1.
Slide 1 Shaun Houlihan Pumpkin, Inc. Applying Standard Commands for Programmable Instruments (SCPI) to CubeSats.
T Project Review Sotanorsu I2 Iteration
The World Leader in High Performance Signal Processing Solutions Linux Industrial I/O Subsystem Open Platform Solutions Michael Hennerich.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
Computer System Structures
JavaIOC Overview and Update
Real-time Software Design
Chapter 9: Virtual-Memory Management
An Embedded Software Primer
Functions of an operating system
Channel Access Concepts
Commissioning the European XFEL cryogenic system and best practice
Channel Access Concepts
Presentation transcript:

ICS – Software Engineering Group 1 The SNS General Time Timestamp Driver Sheng Peng & David Thompson

ICS – Software Engineering Group 2 Why create a new timestamp driver? l SNS has a timing system that supports hardware timestamps and we use those timestamps to correlate data. l Existing timestamp support (in drvTS) calls the same time source for event timestamps (in record processing) as well as for scan task and I/O task scheduling. l No time source is 100% reliable, we wanted to provide for selection and use of an alternate source if the primary source is unavailable. l The built in EPICS time interface in iocClock.c does not provide for redundancy if a primary time source fails.

ICS – Software Engineering Group 3 The problem l At SNS we noticed on at least two occasions that some of our IOCS were not scanning records and that some vxWorks tasks had unusual delays in the task display. This required some expensive reboots. l The second time that we saw it happen we were ready and captured enough data to track the problem down to the GPS receiver in the timing system. l GPS keeps time in 1024 week “epochs”, our receiver jumped to an epoch far into the future and stayed there for a couple of minutes. When it jumped back many of our IOCs had drvEtherIp tasks in progress processing data and these got caught by turning a large negative time jump into a large delay. (The receiver was RMA-d for a firmware update and has behaved since.) l During normal timing system operation noise can be experienced on the RTDL causing transient problems.

ICS – Software Engineering Group 4 The problem l Even NTP is not perfect: We had one workstation that had a bad clock. It ran at about half time and made 15 second jumps to catch up. This caused it to mis-report “beacon anomalies” l Time itself is not monotonic! (UTC time at least) The mean solar day was “exactly” SI seconds in 1820, but in recent years it has been as much as seconds. A leap second is added every few years to adjust UTC. Since the earth is running slower than UTC then UTC must be set backwards by a second. The difference is about ½ second now. (

ICS – Software Engineering Group 5 What is generalTime? l It is a time source manager l It always selects the “best available” time source, depending on whether an event time or the current time is requested. l It supports hardware time sources i.e. timing system. l It provides two default time source: NTP & Ticks via clock_gettime(). l Can be extended by just adding time drivers as normal epics drivers to the system. »We are planning a driver to support on-board clock chips for full stand alone IOC Best available is the one that has the highest priority and is not returning ERROR. The driver must be able to know it is wrong.

ICS – Software Engineering Group 6 API (extending iocClockRegister) l General time calls: iocClockRegister(). l A time driver calls: generalTimeTpRegister(). Arguments: »Tcp_priority: Priority of current time function. »getCurrent: Pointer to current time function in your driver. »syncTime: A pointer to a function that general time calls to synchronize the time in the driver if needed. »Tep_priority: Priority of event time function. »getEvent: The event time function in your driver.

ICS – Software Engineering Group 7 API (Continued) l When an EPICS API function requests a current time or an event time, general time calls registered time functions in order of priority. l When a time driver returns OK the search for the time is stopped and that time is returned to the Epics system caller. l If the time function returns ERROR then the next lower priority driver is called. l The lowest priority time is the system time which should always be available, even if it is wrong.

ICS – Software Engineering Group 8 Details IocClock Functions drvGeneralTime/ devGeneralTime drvTimeVxWorks devTimeVxWorks drvUtil drvTimeNTP devTimeNTP drvTimeCMOS devTimeCMOS drvGeneralTime returns the highest priority time source available This is completely transparent to epics time and record processing functions. The devTimeXXX drivers must support an ai record returning seconds since 1/1/1990. The ai record can be linked to a string record for readable time or monitored with a calc record for differences.

ICS – Software Engineering Group 9 General time features: l General time is an Epics driver with device support. l The drvGeneralTime report function reports status and a list of time providers. l Device support provides string and ai record support for status of current time providers for both event time and current time lists.

ICS – Software Engineering Group 10 Utility module (SNS Hardware) l No longer uses drvTS. l USES generalTime interfaces. l The Utility driver has been improved because it no longer has to provide time when the RTDL is bad. The old driver had to implement NTP to provide back up time. l Returns error if time is bad, so general time can pick next best. »Timing master reboot causes zero timestamp errors in generalTime »The timing master will set a flag on the RTDL when it does not know the time for some reason. This will be passed up to general time. l The driver has had internal changes to detect and track VME and timing system errors.

ICS – Software Engineering Group 11 Conclusions l We would like to see general time replace iocClock in builds for real time OS. l General time is written using OSI calls. l Works the same as iocClock when hardware time is not available, even if hardware time is configured and installed. l drvTimeNtp is derived from iocClock.c l Probably most useful on vxWorks where the basic system time calls do not use NTP.