arXiv:2410.15492cs.LGcs.OS2024-10

用强化学习动态优化内存分配,提升系统适应性和效率

Reinforcement Learning for Dynamic Memory Allocation

  • 设计可自学习的强化学习框架,持续优化内存分配策略
  • 在对抗性请求场景下,性能超越传统首次适配等算法
  • 引入历史依赖策略,更好应对复杂内存请求模式

近年来,强化学习(RL)在系统资源管理领域展现出良好应用前景。本文将RL拓展至动态内存分配这一新领域,针对当前首部适配、最佳适配和最差适配等算法在变化环境下易产生碎片化、效率低下等问题,提出一种基于RL的持续学习框架。该框架通过与系统交互,不断优化内存分配决策。实验采用高阶与低阶动作空间,测试多种分配模式,结果表明:所提方法在对抗性请求模式下能有效匹配并超越传统策略。此外,研究还探索了利用历史分配请求信息的策略,显著增强对复杂请求模式的处理能力。整体表明,强化学习为构建更自适应、高效的内存分配机制提供了可行路径,有望突破硬编码算法的局限。

原文摘要 · Abstract (English)

In recent years, reinforcement learning (RL) has gained popularity and has been applied to a wide range of tasks. One such popular domain where RL has been effective is resource management problems in systems. We look to extend work on RL for resource management problems by considering the novel domain of dynamic memory allocation management. We consider dynamic memory allocation to be a suitable domain for RL since current algorithms like first-fit, best-fit, and worst-fit can fail to adapt to changing conditions and can lead to fragmentation and suboptimal efficiency. In this paper, we present a framework in which an RL agent continuously learns from interactions with the system to improve memory management tactics. We evaluate our approach through various experiments using high-level and low-level action spaces and examine different memory allocation patterns. Our results show that RL can successfully train agents that can match and surpass traditional allocation strategies, particularly in environments characterized by adversarial request patterns. We also explore the potential of history-aware policies that leverage previous allocation requests to enhance the allocator's ability to handle complex request patterns. Overall, we find that RL offers a promising avenue for developing more adaptive and efficient memory allocation strategies, potentially overcoming limitations of hardcoded allocation algorithms.

强化学习内存管理自适应分配

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。