WP3 Workshop 16/01/2002 Timestamps.

Slides:



Advertisements
Similar presentations
VOTable 2005 Applications. Agenda Description of some applications Description of some applications Nilesh UrunkarAbout C++ Parser and CONVOT Nilesh UrunkarAbout.
Advertisements

Japanese Activities and Views on the Agenda Item 1.14 Tsukasa Iwama National Institute of Information and Communications Technology (NICT) JAPAN.
Time in Embedded and Real Time Systems Lecture #6 David Andrews
WP3 Budapest SEP-2002 EDG Timestamping John Ryan, Brian Coghlan Trinity College Dublin.
Time Michelle Houck April 28, 2008, 4:15pm EST. What is time? Standard by which we measure Standard by which we measure One of the fundamental units of.
M68K Assembly Language Programming Bob Britton Chapter 12 IEEE Floating Point Notice: Chapter slides in this series originally provided by B.Britton. This.
Floating Point Numbers
PZ04A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ04A - Scalar and composite data Programming Language.
DataGrid WP3 MAR-2002 Timestamps. We would like the information system to associate each measurement with the time it was made We would like to handle.
Floating Point Numbers
Bit Operations C is well suited to system programming because it contains operators that can manipulate data at the bit level –Example: The Internet requires.
A bit can have one of two values: 0 or 1. The C language provides four operators that can be used to perform bitwise operations on the individual bits.
AtacamaLargeMillimeterArray ACS Training Time System.
Computer Science 210 Computer Organization Floating Point Representation.
IT 251 Computer Organization and Architecture Introduction to Floating Point Numbers Chia-Chi Teng.
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK November 2014.
Basis Data Terapan Yoannita. SQL Server Data Types Character strings: Data typeDescriptionStorage char(n)Fixed-length character string. Maximum 8,000.
Abstract Syntax Notation Computer Networks courses Villanova University.
International Telecommunication Union APT INFORMATION SESSION ON WRC-15 Agenda Item 1.14 (Bangkok, 10 February 2015) Vincent Meens Chairman of ITU-R SG.
1 Lecture 5 Floating Point Numbers ITEC 1000 “Introduction to Information Technology”
CEN 316 Computer Organization and Design Computer Arithmetic Floating Point Dr. Mansour AL Zuair.
COMPSCI 210 Semester Tutorial 1
Data Representation - Part II. Characters A variable may not be a non-numerical type Character is the most common non- numerical type in a programming.
Floating Point (a brief look) We need a way to represent –numbers with fractions, e.g., –very small numbers, e.g., –very large numbers,
Oct. 18, 2007SYSC 2001* - Fall SYSC2001-Ch9.ppt1 See Stallings Chapter 9 Computer Arithmetic.
Binary to Decimal Conversion for LCI IETF 67 – GeoPriv WG 11/06/2006 San Diego.
GRID IIII D UK Particle Physics GridPP Collaboration meeting - R.P.Middleton (RAL/PPD) 23-25th May Grid Monitoring Services Robin Middleton RAL/PPD24-May-01.
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK April 2006.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK June 2004.
Preliminary views on the future of UTC Chunhao Han Beijing Satellite Navigation Center Information Session, APG4, Thailand, Feb.9-13, 2015.
Operators & Identifiers The Data Elements. Arithmetic Operators exponentiation multiplication division ( real ) division ( integer quotient ) division.
Digital Representations ME 4611 Binary Representation Only two states (0 and 1) Easy to implement electronically %0= (0) 10 %1= (1) 10 %10= (2) 10 %11=
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
IT1004: Data Representation and Organization Negative number representation.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale Floating point arithmetic.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
1 Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
Floating Point Representations
CS2100 Computer Organisation
Dr.Faisal Alzyoud 2/20/2018 Binary Arithmetic.
Computer Science 210 Computer Organization
3.1 Denary, Binary and Hexadecimal Number Systems
Introduction To Computer Science
Chapter 6: Data Types Lectures # 10.
SQL – Data types.
Floating Point Number system corresponding to the decimal notation
CS 232: Computer Architecture II
William Stallings Computer Organization and Architecture 7th Edition
CS1010 Programming Methodology
Data Structures Mohammed Thajeel To the second year students
Introduction to data converters
Data Representation Data Types Complements Fixed Point Representation
Computer Science 210 Computer Organization
Approximations and Round-Off Errors Chapter 3
ECEG-3202 Computer Architecture and Organization
What Time Is It? Martin Phillips Ladybridge Systems.
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Floating Point Numbers
Kirkwood Center for Continuing Education
Numbers with fractions Could be done in pure binary
Database Instructor: Bei Kang.
Presentation transcript:

WP3 Workshop 16/01/2002 Timestamps

Timestamps We would like the information system to associate each measurement with the time it was made We would like to handle fresh and archive data in a uniform manner All information must carry a timestamp

Timestamps – what? ASCII timestamp Binary timestamp Formatted string E.g 2002-01-16T12:45:50.36Z Binary timestamp Local binary representation Linux – two ints/longs

ASCII Format A number of efforts currently underway IETF currently has an RFC for defining date & time format for internet based on the standard representation of dates and times ISO8601 GGF also has a standard model, more or less same; But includes meta-info such as precision & accuracy information

ASCII Format IETF format (ISO 8601) GGF format (grd-perf-15-1) Yyyy-mm-ddThh:mm:ss.FfffZ T & Z (specifies UTC) are compulsory GGF format (grd-perf-15-1) As above but with the inclusion of accuracy resolution information Yyyy-mm-ddThh:mm:ss.FfffZxxxryya Number before ‘r’ is the resolution, ‘a’ is accuracy eg 2002-01-16T12:46:48.7567Z.00000001r.00001a

Binary Format New/Current Unix struct timeval is implemented using two long integers First is 64-bit signed second value Last is 64-bit signed micro-second Not enough precision for future applications with fractional part. Resolution can be different for platforms and programming languages

Timestamps How is time defined & referenced ? Based on the rotation of the earth on its axis – Universal Time (UT/UT0/UT1/UT2) TAI (Temps Atomique International ) (a.k.a Atomic time) S.I. Second defined as 9192631770 cycles of the caesium resonance UTC Time (Coordinated Universal Time) Same S.I. SECOND as TAI, but adjusted to include steps (leap seconds) to keep within .9s of UT1

Timestamps How is time referenced ? In relation to the time-definition’s epoch Each definition has a different epoch TAI 1-1-1958 UTC 1-1-1972 (sort of) GPS 1-1-1980

Timestamps – UT1,UTC & TAI But UTC = TAI – n x (1s) and UTC kept within 0.9s of UT1 (irregular) Integer leapseconds since 1972 TAI - UTC rebased to 10s IERS (Paris) determines when to introduce +/- leapsecond, very irregular Introduced as an extra second at end of a month (currently only June and December used)

Leapseconds -problem Problem converting between ASCII and binary (UTC) timestamps Must possess times at which leapsecond was introduced All sites/nodes must view the same information “A second is represented by an integer from 0 to 60; the values 60 and 61 occur only for leap seconds and even then only in Java implementations that actually track leap seconds correctly” – JDK documentation

Leapseconds, an example Normal (common) year = (365 x 86400) seconds 1998 lasted longer (due to aggregate deceleration of the earth due by tidal forces) A leapsecond was introduced by IERS 1-December-1998 23:59:58 1-December-1998 23:59:59 1-December-1998 23:59:60 (+1s) 1-December-1998 00:00:00

Problem- Timestamp Conversion b consumes information Ia(ta) a b Assume: sites a & c are corrected for leap seconds, b is not When b utilises Ia(ta) it must first convert to binary, this value is now incorrect, by as much as 32 seconds, but at least 1. a, produces information Ia with timestamp ta Ia(ta) c c, also consumes information Ia(ta)

Solution All sites obtain leapsecond information from the same information source Use R-GMA Only need one node to obtain data from USNO ftp site. This node will publish information via a DBProducerServlet Timestamp class will use this information to convert between formats

Solution (part a) DB Producer Servlet Consumer Servlet Application U.S.N.O. Leapsecond prod DB Producer Consumer Servlet SQL-DB Consumer Timestamp obj Leap Second data Application (Local Persistent Cache)

Solution (Part B) ASCII to binary conversion ASCII ta -> Binary tb Find corresponding leapsecond value, L for ta Corrected binary value = tb + L

Solution (Part B) Binary to ASCII conversion Binary ta -> ASCII tb Find corresponding leapsecond value, L for ta Corrected binary value = tb - L Easy to reverse engineer the ASCII fields from the binary second amount

Solution (Part B) Must decide upon Binary and ASCII second fraction format. UNIX binary fraction is given as the elapsed micro-seconds (resolution not good enough for future applications) GGF were proposing a binary fraction of a second value (regressed to ASCII only) IETF only have a decimal fraction of variable length

The Earth Was Created 4 Billion Years Ago… Must decide on an epoch for binary timestamps NTP = 1/1/1900 TAI = 1/1/1958 UNIX= 1/1/1970 UTC= 1/1/1972 GPS = 1/1/1980 Y2K = 1/1/2000 Most sensible TAI, UTC or Y2K UNIX unsatisfactory -- non-integer offset ! Easy to convert from others

To do… Decide upon Performance evaluation Epoch Binary fraction of second format Will there be accuracy/resolution info Performance evaluation Conversion times Optimise field extraction & testing Cron scripts for obtaining data?