{'fraction_non_alphanumeric': 0.01564828614008942, 'fraction_numerical': 0.0, 'mean_word_length': 5.456730769230769, '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}}
Memory Layout Optimization for Task-Based Intermittent Computing Systems

The embedded system with energy harvest equipment collects the energy required for system operation from its working environment and releases it from the battery. However, the equipment can only provide intermittent power because environmental energy fluctuates. As a result, to assure the program’s progress, the program states must be stored timely and frequently. A promising paradigm for providing this capability is the task-based intermittent computing, in which each task is executed atomically and the states stored in shared memory across task boundaries must be preserved. The total number of saved states influences execution energy and time, and memory layout influences the saved memory interval of each task. In this paper, we model and analyze the influence of memory layout on the task-based computing system, and we establish an optimization problem for memory layout aimed at reducing the unnecessary operations on state backup. A heuristic algorithm based on genetic algorithms is proposed to obtain the approximate optimal solution in polynomial time. The benchmark test evaluation results show that, by optimizing the layout of memory variables, the proposed method significantly reduces the cost of state saving and improves execution efficiency.