UBIFS移植到UCOS-II的研究与实现
发布时间:2018-01-19 19:14
本文关键词: μC/OS-Ⅱ UBIFS NAND flash 移植 嵌入式系统 出处:《华东师范大学》2012年硕士论文 论文类型:学位论文
【摘要】:由于NAND flash存储介质的物理特性,NAND flash面临垃圾收集、损耗均衡和坏块处理三大挑战[1]。对于没有文件系统的flash,其擦写位置固定,容易使flash产生坏块。因此它需要专门的程序来处理坏块,加大了flash开发的难度和周期。而使用针对flash的文件系统是嵌入式应用系统中使用最广泛的一种存储策略,它支持日志结构,并提供损耗平衡、掉电保护、垃圾收集机制和崩溃恢复机制等,不仅降低了flash的开发难度也延长了flash的使用寿命。 UBIFS的挂载时间、内存使用和I/O速度不依赖flash的存储大小,它能很好的支持数百G的flash。 UBIFS档案系统目录储存在flash上,UBIFS挂载时不需要扫描整个flash存储的所有数据来重新建立档案目录,UBIFS不仅支援快速压缩档案资料,而且对档案的压缩,用户可以选择部分或者全部压缩。UBIFS支持回写,其写入flash的资料会被缓存在内存中,直到有必要写入时才写到flash存储介质,大大地降低了分散小区块的数量,并且也提高了I/O效率。另外UBIFS使用日志记录,可减少对索引的更新频率。JFFS2文件系统的缓存非常小,它在存储数据时,其性能近似同步的操作,并没有起到很好的缓存效果。 UBIFS在设计与性能上均较YAFFS2.JFFS2更适合MLC NAND FLASH。 UBIFS目前只应用在linux内核中,其应用领域主要是复杂的硬件环境。在低端平台中也需要UBIFS的应用。μC/OS-Ⅱ正是针对此类低端硬件环境而开发的一个嵌入式实时系统,它使得在性能低下的硬件上面可以实现操作系统的许多特性,如实时性、多任务、进程间通信等。在μC/OS-Ⅱ的很多应用领域中,需要flash来存储数据,尤其是更新频繁的应用,更需要像UBIFS针对flash存储优化的文件系统。 本文首先深入剖析μC/OS-Ⅱ的系统原理,再分析NAND flash的物理特性和面临的挑战,研究主流的针对NAND flash优化的文件系统。接着提出UBIFS移植到μC/OS-Ⅱ的可行方法。最后设计测试方案,对移植的代码进行测试。
[Abstract]:Due to the physical characteristics of NAND flash storage medium, NAND flash faces three challenges: garbage collection, loss balance and bad block processing. [For flash without file system, its write position is fixed, which makes flash produce bad block easily. Therefore, it needs special program to deal with bad block. The use of file system for flash is the most widely used storage strategy in embedded application system, which supports log structure and provides loss balance. Power failure protection, garbage collection mechanism and crash recovery mechanism not only reduce the difficulty of flash development, but also prolong the service life of flash. UBIFS's mount time, memory usage, and I / O speed do not depend on the size of flash storage. It supports hundreds of gigabytes of flash. UBIFS file system directories stored on flash. UBIFS mounts do not need to scan all the data stored in the entire flash to re-establish the file directory UBIFS not only supports the rapid compression of file data, but also the compression of files. The user can choose to partially or completely compress. UBIFS supports write-back, and the data written to the flash is cached in memory until it is necessary to write to the flash storage medium. It greatly reduces the number of scattered cell blocks and improves I / O efficiency. In addition, UBIFS uses logging to reduce the update frequency of the index. JFFS2 file system cache is very small. When it stores data, it performs approximately synchronous operations. UBIFS is more suitable for MLC NAND flash than YAFFS2.JFFS2 in design and performance. UBIFS is currently used only in the linux kernel. The application field is mainly complex hardware environment, and the application of UBIFS is also needed in the low-end platform. 渭 C / OS- 鈪,
本文编号:1445235
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1445235.html