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.

Slides:



Advertisements
Similar presentations
Computer Engineering FloatingPoint page 1 Floating Point Number system corresponding to the decimal notation 1,837 * 10 significand exponent A great number.
Advertisements

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.
Floating Point Numbers
PZ04A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ04A - Scalar and composite data Programming Language.
Floating Point Numbers
AtacamaLargeMillimeterArray ACS Training Time System.
Computer Science 210 Computer Organization Floating Point Representation.
Modern Navigation Thomas Herring MW 11:00-12:30 Room
Time. What Time is It? April 5, 2014 “normal time” Local time is the date/time reported by your PC. UTC, Coordinated Universal Time, popularly known.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
Computer Arithmetic Nizamettin AYDIN
International Telecommunication Union APT INFORMATION SESSION ON WRC-15 Agenda Item 1.14 (Bangkok, 10 February 2015) Vincent Meens Chairman of ITU-R SG.
NTP Network Time Protocol Nóirín Plunkett Network Time Protocol Nóirín Plunkett.
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.
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.
ITEC 1011 Introduction to Information Technologies 4. Floating Point Numbers Chapt. 5.
Number Representation for
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK June 2004.
Fixed & Floating Number Format Dr. Hugh Blanton ENTC 4337/5337.
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.
CS1Q Computer Systems Lecture 2 Simon Gay. Lecture 2CS1Q Computer Systems - Simon Gay2 Binary Numbers We’ll look at some details of the representation.
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
Number Systems.
Dr.Faisal Alzyoud 2/20/2018 Binary Arithmetic.
Computer Science 210 Computer Organization
NUMBER SYSTEMS.
3.1 Denary, Binary and Hexadecimal Number Systems
Introduction To Computer Science
Floating Point Math & Representation
Chapter 2 Data Types and Representations
Floating Point Number system corresponding to the decimal notation
CS 232: Computer Architecture II
CS1010 Programming Methodology
Data Structures Mohammed Thajeel To the second year students
Computer Science 210 Computer Organization
Approximations and Round-Off Errors Chapter 3
Data Structures & Algorithms
ECEG-3202 Computer Architecture and Organization
File Storage and Indexing
Floating Point Numbers
COMS 161 Introduction to Computing
Numbers with fractions Could be done in pure binary
WP3 Workshop 16/01/2002 Timestamps.
Presentation transcript:

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 fresh and archive data in a uniform manner All information must carry a timestamp

Timestamps – what? ASCII timestamp Formatted string E.g T12: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 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 T12:46: Z r.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 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 UTC (sort of) GPS

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 :59:58 1-December :59:59 1-December :59:60 (+1s) 1-December :00:00

Problem- Timestamp Conversion ab c a, produces information Ia with timestamp ta Ia(ta) c, also consumes information Ia(ta) b consumes information Ia(ta) 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.

Solution All sites obtain leapsecond information from the same information producer 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) SQL-DB DB Producer Leapsecond prod DB Producer Servlet U.S.N.O. Consumer Servlet Timestamp obj Application (Local Cache) Leap Second data

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

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

Solution (Part B) ASCII --> binary --> ASCII 450MHz P2 + Sun JDK cache file size adapts to no.leapseconds since 1972 [22 so far] ~20mS startup [to read from cache file] when timestamp object is instantiated 225 sec for 10 6 conversions tested multiple +ve and -ve leapseconds Blackdown order-of-mag. slower - why ?

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/1900TAI = 1/1/1958 UNIX= 1/1/1970UTC= 1/1/1972 GPS = 1/1/1980Y2K = 1/1/2000 Most sensible TAI, UTC or Y2K Easy to convert from others UNIX -> non-integer leapsecond value

To do… Decide upon Epoch Minimum binary fraction-of-second format Accuracy/resolution info Write CRON scripts to obtain leapsecond info from USNO to populate cache files to randomize the timing of these actions