{'fraction_non_alphanumeric': 0.01853035143769968, 'fraction_numerical': 0.0, 'mean_word_length': 5.314516129032258, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An efficient time representation for real-time embedded systems

Real-time systems should provide a time representation mechanism which allows to specify timing constraints in a wide range and with sufficiently high resolution. Moreover, the system lifetime (that is, the longest absolute time that can be handled by the system) should be as long as possible, or possibly infinite. In powerful architectures, this goal is achieved by representing time through variables with a large number of bits. Unfortunately, in real-time embedded systems with small memory requirements, such a solution cannot be used, and a trade off needs to be found for memory, system resolution and the longest representable timing constraint. In such systems, the runtime overhead introduced by the time representation mechanism is also crucial and needs to be taken into account.In this paper we present an efficient method for time representation suited for small embedded systems. The method allows to achieve an infinite lifetime, high resolution and deal with sufficiently large timing constraints. The proposed approach is compared with other methods proposed in the literature and it is proved to be more efficient in terms of both overhead and memory requirements. The method allows an efficient implementation of deadline-based scheduling algorithms (such as EDF) and time accounting mechanisms for capacity based servers and resource reservation policies. The proposed technique has also been implemented and tested in two real-time kernels for small embedded microcontrollers.