计算机应用 ›› 2015, Vol. 35 ›› Issue (10): 3008-3012.DOI: 10.11772/j.issn.1001-9081.2015.10.3008

• 行业与领域应用 • 上一篇    下一篇

面向Android系统的目录自适应日志模式选择机制

徐远超1,2, 孙凤芸1, 闫俊峰1, 万虎1   

  1. 1. 首都师范大学 信息工程学院, 北京 100048;
    2. 高可靠嵌入式系统技术北京市工程研究中心(首都师范大学), 北京 100048
  • 收稿日期:2015-05-04 修回日期:2015-06-30 出版日期:2015-10-10 发布日期:2015-10-14
  • 通讯作者: 徐远超(1975-),男,湖北武汉人,讲师,博士,CCF会员,主要研究方向:计算机体系结构、操作系统,xuyuanchao@cnu.edu.cn
  • 作者简介:孙凤芸(1989-),女,河南新乡人,硕士研究生,CCF会员,主要研究方向:面向新型存储介质的系统软件;闫俊峰(1991-),女,山东潍坊人,硕士研究生,主要研究方向:面向新型存储介质的系统软件;万虎(1991-),男,安徽宿州人,硕士研究生,CCF会员,主要研究方向:面向新型存储介质的系统软件。
  • 基金资助:
    国家自然科学基金资助项目(61472260,61402302);北京市自然科学基金资助项目(4143060);北京市属高等学校人才强教深化计划项目(135300100);北京市属高等学校创新团队建设与教师职业发展计划项目(IDHT20150507)。

Directory-adaptive journaling mode selective mechanism for Android systems

XU Yuanchao1,2, SUN Fengyun1, YAN Junfeng1, WAN Hu1   

  1. 1. College of Information Engineering, Capital Normal University, Beijing 100048, China;
    2. Beijing Engineering Research Center of High Reliable Embedded System (Capital Normal University), Beijing 100048, China
  • Received:2015-05-04 Revised:2015-06-30 Online:2015-10-10 Published:2015-10-14

摘要: 在写磁盘的过程中如果意外掉电或系统崩溃很有可能导致文件系统中用户数据和元数据不一致,现有文件系统主要采取写前日志或写时拷贝等一致性技术来解决该问题,但均没有考虑目录对可靠性需求的差异性。针对现有的文件自适应日志模式存在的需要逐一修改应用程序的不足,提出了面向Android系统的目录自适应的日志模式选择机制,即针对不同的目录对可靠性需求的高低等级,选择相应的强弱程度不同的日志模式,同时分配可靠性不同的存储区域,这种机制对开发者完全透明,也符合Android系统的应用特征,在可靠性需求不变的前提下最大限度地减少了一致性保证引入的额外开销。实验结果表明,修改后的文件系统可以识别文件所在目录,并根据目录选择预先定义的日志模式。

关键词: 文件系统, 一致性, 目录自适应, 系统崩溃, 日志模式, Android

Abstract: The unexpected power loss or system crash can result in data inconsistency upon updating a persistent data structure. Most existing file systems use some consistency techniques such as write-ahead logging, copy-on-write to avoid this situation. These mechanisms, however, introduce a significant overhead, and fail to adapt to the diversity of directory and heterogeneity of data reliability demands. Existing file-adaptive journaling technique is required to modify legacy applications. Therefore, a directory-adaptive journaling mode selective mechanism for Android systems was proposed to choose different journaling modes with strong or weak consistency guarantees in terms of different directories reliability demands. This mechanism is transparent to developers, and also matches the feature of Android systems, hence, it greatly reduces the consistency guarantee overhead without sacrifice of reliability. The experimental results show that modified file system can identify directories in which a file resides, meanwhile, choose reasonable pre-defined journaling mode.

Key words: file system, consistency, directory adaptive, system crash, journaling mode, Android

中图分类号: