Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices

Tiny embedded devices are cost and energy-sensitive, and high-density emerging non-volatile memory (NVM) can help reduce energy consumption at a fraction of the cost. However, high-density NVM has low write endurance compared to volatile memory, so it is vulnerable to write concentration. Most NVM l...

Full description

Bibliographic Details
Main Authors: Jeongmin Lee, Moonseok Jang, Kexin Wang, Inyeong Song, Hyeonggyu Jeong, Jinwoo Jeong, Yong Ho Song, Jungwook Choi
Format: Article
Language:English
Published: IEEE 2022-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/9964379/
_version_ 1811208966180438016
author Jeongmin Lee
Moonseok Jang
Kexin Wang
Inyeong Song
Hyeonggyu Jeong
Jinwoo Jeong
Yong Ho Song
Jungwook Choi
author_facet Jeongmin Lee
Moonseok Jang
Kexin Wang
Inyeong Song
Hyeonggyu Jeong
Jinwoo Jeong
Yong Ho Song
Jungwook Choi
author_sort Jeongmin Lee
collection DOAJ
description Tiny embedded devices are cost and energy-sensitive, and high-density emerging non-volatile memory (NVM) can help reduce energy consumption at a fraction of the cost. However, high-density NVM has low write endurance compared to volatile memory, so it is vulnerable to write concentration. Most NVM lifetime improvement studies in the existing embedded environment have distributed writes by modifying the mapping relationship between physical and logical addresses. However, applying the existing wear leveling techniques in low-end MCUs such as ARM Cortex M3/M4 that use only physical addresses is hard. Therefore, we wear-level the write-heavy stack area to improve the NVM lifetime in low-end MCUs. However, since the stack of bare metal applications is difficult to move during runtime, we implement the migration function targeting the task stack of FreeRTOS. The task stack moves based on time, and to avoid the pointer validation problem caused by the movement of the task stack, we migrate the stack under safe conditions. In addition, FreeRTOS uses a single heap to preferentially allocate to low free space, which reduces the degree of freedom where the stack moves, reducing the effect of distributing the writes. To alleviate this problem, we add another heap for the stack migration and introduce circular dynamic allocation in the heap. Through our experiments, the proposed method was about 19.6% larger than the ideal case of maximum write, and the computational overhead was about 0.2%.
first_indexed 2024-04-12T04:32:02Z
format Article
id doaj.art-0faedb8b1cd843b098d05241e64e44b6
institution Directory Open Access Journal
issn 2169-3536
language English
last_indexed 2024-04-12T04:32:02Z
publishDate 2022-01-01
publisher IEEE
record_format Article
series IEEE Access
spelling doaj.art-0faedb8b1cd843b098d05241e64e44b62022-12-22T03:47:55ZengIEEEIEEE Access2169-35362022-01-011012531912533310.1109/ACCESS.2022.32251939964379Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based DevicesJeongmin Lee0https://orcid.org/0000-0002-1153-9736Moonseok Jang1https://orcid.org/0000-0003-3751-4630Kexin Wang2Inyeong Song3Hyeonggyu Jeong4Jinwoo Jeong5https://orcid.org/0000-0001-6485-0029Yong Ho Song6Jungwook Choi7https://orcid.org/0000-0002-5691-4771Department of Electronics Engineering, Hanyang University, Seoul, South KoreaDepartment of Electronics Engineering, Hanyang University, Seoul, South KoreaDepartment of Electronics Engineering, Hanyang University, Seoul, South KoreaDepartment of Electronics Engineering, Hanyang University, Seoul, South KoreaDepartment of Electronics Engineering, Hanyang University, Seoul, South KoreaDepartment of Electronics Engineering, Hanyang University, Seoul, South KoreaSamsung Electronics, Hwaseong, South KoreaDepartment of Electronics Engineering, Hanyang University, Seoul, South KoreaTiny embedded devices are cost and energy-sensitive, and high-density emerging non-volatile memory (NVM) can help reduce energy consumption at a fraction of the cost. However, high-density NVM has low write endurance compared to volatile memory, so it is vulnerable to write concentration. Most NVM lifetime improvement studies in the existing embedded environment have distributed writes by modifying the mapping relationship between physical and logical addresses. However, applying the existing wear leveling techniques in low-end MCUs such as ARM Cortex M3/M4 that use only physical addresses is hard. Therefore, we wear-level the write-heavy stack area to improve the NVM lifetime in low-end MCUs. However, since the stack of bare metal applications is difficult to move during runtime, we implement the migration function targeting the task stack of FreeRTOS. The task stack moves based on time, and to avoid the pointer validation problem caused by the movement of the task stack, we migrate the stack under safe conditions. In addition, FreeRTOS uses a single heap to preferentially allocate to low free space, which reduces the degree of freedom where the stack moves, reducing the effect of distributing the writes. To alleviate this problem, we add another heap for the stack migration and introduce circular dynamic allocation in the heap. Through our experiments, the proposed method was about 19.6% larger than the ideal case of maximum write, and the computational overhead was about 0.2%.https://ieeexplore.ieee.org/document/9964379/Embedded softwarememory managementnonvolatile memoryreal-time systems
spellingShingle Jeongmin Lee
Moonseok Jang
Kexin Wang
Inyeong Song
Hyeonggyu Jeong
Jinwoo Jeong
Yong Ho Song
Jungwook Choi
Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices
IEEE Access
Embedded software
memory management
nonvolatile memory
real-time systems
title Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices
title_full Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices
title_fullStr Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices
title_full_unstemmed Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices
title_short Improving NVM Lifetime Using Task Stack Migration on Low-End MCU-Based Devices
title_sort improving nvm lifetime using task stack migration on low end mcu based devices
topic Embedded software
memory management
nonvolatile memory
real-time systems
url https://ieeexplore.ieee.org/document/9964379/
work_keys_str_mv AT jeongminlee improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT moonseokjang improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT kexinwang improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT inyeongsong improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT hyeonggyujeong improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT jinwoojeong improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT yonghosong improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices
AT jungwookchoi improvingnvmlifetimeusingtaskstackmigrationonlowendmcubaseddevices