UBIFS移植到UCOS-II的研究與實現(xiàn)
發(fā)布時間:2018-01-19 19:14
本文關鍵詞: μC/OS-Ⅱ UBIFS NAND flash 移植 嵌入式系統(tǒng) 出處:《華東師范大學》2012年碩士論文 論文類型:學位論文
【摘要】:由于NAND flash存儲介質(zhì)的物理特性,NAND flash面臨垃圾收集、損耗均衡和壞塊處理三大挑戰(zhàn)[1]。對于沒有文件系統(tǒng)的flash,其擦寫位置固定,容易使flash產(chǎn)生壞塊。因此它需要專門的程序來處理壞塊,加大了flash開發(fā)的難度和周期。而使用針對flash的文件系統(tǒng)是嵌入式應用系統(tǒng)中使用最廣泛的一種存儲策略,它支持日志結構,并提供損耗平衡、掉電保護、垃圾收集機制和崩潰恢復機制等,不僅降低了flash的開發(fā)難度也延長了flash的使用壽命。 UBIFS的掛載時間、內(nèi)存使用和I/O速度不依賴flash的存儲大小,它能很好的支持數(shù)百G的flash。 UBIFS檔案系統(tǒng)目錄儲存在flash上,UBIFS掛載時不需要掃描整個flash存儲的所有數(shù)據(jù)來重新建立檔案目錄,UBIFS不僅支援快速壓縮檔案資料,而且對檔案的壓縮,用戶可以選擇部分或者全部壓縮。UBIFS支持回寫,其寫入flash的資料會被緩存在內(nèi)存中,直到有必要寫入時才寫到flash存儲介質(zhì),大大地降低了分散小區(qū)塊的數(shù)量,并且也提高了I/O效率。另外UBIFS使用日志記錄,可減少對索引的更新頻率。JFFS2文件系統(tǒng)的緩存非常小,它在存儲數(shù)據(jù)時,其性能近似同步的操作,并沒有起到很好的緩存效果。 UBIFS在設計與性能上均較YAFFS2.JFFS2更適合MLC NAND FLASH。 UBIFS目前只應用在linux內(nèi)核中,其應用領域主要是復雜的硬件環(huán)境。在低端平臺中也需要UBIFS的應用。μC/OS-Ⅱ正是針對此類低端硬件環(huán)境而開發(fā)的一個嵌入式實時系統(tǒng),它使得在性能低下的硬件上面可以實現(xiàn)操作系統(tǒng)的許多特性,如實時性、多任務、進程間通信等。在μC/OS-Ⅱ的很多應用領域中,需要flash來存儲數(shù)據(jù),尤其是更新頻繁的應用,更需要像UBIFS針對flash存儲優(yōu)化的文件系統(tǒng)。 本文首先深入剖析μC/OS-Ⅱ的系統(tǒng)原理,再分析NAND flash的物理特性和面臨的挑戰(zhàn),研究主流的針對NAND flash優(yōu)化的文件系統(tǒng)。接著提出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
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1445235.html
最近更新
教材專著