PowerPoint XP


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • This graph shows hardware evolution over time. The vertical axis is in log scale. First, CPU and memory are improving at 50% per year. However, disk is improving only at the rate of 15% per year. And, this gap is widening from 5 orders of magnitude to 6 orders of magnitude. In human scales, back in 1990, if CPU access takes 1 second, disk would take 6 days. In 2000, this ratio is now 1 second to 3 months. Let’s think about that this means. It takes 1 second to grab a sheet of paper and write something down. If you call the Santa Claus to physically mail you a piece of paper, it may take 6 days. It takes about a month to make your own paper from papyrus, and most of the time is waiting for your paper to dry up. 3 months is a long time!
  • Now, let us look at the price trend over time. Again, the cost is in the log scale. First, let’s see the cost of paper and film, which is a critical barrier to cross for any storage technology to achieve an economy of scale. Once a storage technology crosses this barrier, it becomes cheap enough to be a storage alternative. (animate) Now let’s look at various cost curves. For disks, various disk geometries are introduced roughly at the top boundary of the paper and film cost barrier. Also, notice the cost curve for the persistent RAM. Back in 1998, the booming of digital photography changed the slope of the curve. By 2005, we would expect to see 4 to 10 GB of persistent RAM on personal desktops. Cheap enough, once cross the boundary
  • The idea of Conquest is to design and build a disk/persistent RAM hybrid file system, which delivers all file system services from memory, with the single exception of high-capacity storage. Two major benefits are simplicity and performance.
  • It is well known that small files take up little space and represent most accesses. Large files take up most of the storage capacity, and they are accessed sequentially most of the time. Of course, database is an exception, and Conquest currently does not handle database workload.
  • Based on this user behavior pattern, Conquest stores the following files in persistent RAM. Small files benefit the most from being stored in memory, because seek time and rotational delays comprise the bulk of the time spent on accessing small objects. Also, we now have fast byte-level accesses as opposed to block-level accesses. Small files are allocated contiguously. Storing metadata in memory avoids the notorious synchronous update problem. And, it deserves some discussion. Basically, if there is no metadata; there is no file system. Therefore, system designers take extra caution when it comes to handling metadata. If you update a directory, for example, most disk-based file systems will propagate the change synchronously to disk. It is a serious performance problem. By storing in metadata in memory, we no longer have this problem. Also, we now have a single representation for metadata, as opposed to a runtime representation and storage representation of metadata. Executables and shared libraries are also stored in core, so we can execute programs in-place, which reduces program startup time significantly.
  • Now let’s take a look at the data path for conventional file systems. A storage request has to go through the IO buffer management, which handles caching. If the request is not in the cache, it has to go through persistence support, which is responsible for translating storage and runtime forms of metadata. The request then needs to go through disk management, which handles disk layout, disk arm scheduling and so on before reaching the disk. For conquest memory, updates to metadata and data are in-place. There is no IO buffer management and disk management. Also, for persistence support, we don’t need to translate between runtime and storage states. All we need to manage is metadata allocation, which I will describe a bit later.
  • Since small files and metadata are taken care of, the disk only needs to handle large files. Which means, we can allocate disk space in big chucks, and it translates into lower access and management overhead. Also, without small objects, we don’t need to worry about fragmentation. We don’t need tricks for small files, such as storing data inside the metadata, or elaborate data structures, such as wrapping a balanced tree onto the geometry of the disk cylinders.
  • For large files that are accessed sequentially, disk can deliver near raw bandwidth, which is about 100 MB per second. And that speed is 200 times faster than random disk accesses. Also, large files have well-defined readahead semantics. Since they are read mostly, large file handling involve little synchronization overhead
  • This shows the disk data path of Conquest. Again, on the left side, we have the data path for conventional file systems. Immediately, you see that Conquest data conquest bypasses mechanisms involved in persistence support. The IO buffer management is greatly simplified because we know the behavior of large file accesses. Also, the disk management is greatly simplified due to the lack of small files and fragmentation management. fonts
  • You may ask, “what about large files that are randomly accessed?” In literature, random accesses are commonly defined as nonsequential accesses. However, if you take a look say a movie file, typically it has 150 scene changes. There are 150 places you may randomly jump to, and perform disk accesses sequentially. Also, looking at a mp3 file, the title is stored at the end of the file, so the typical access is to jump to the end of the file and go back to the beginning to play sequentially. Therefore, what may be random accesses are really near sequentially accesses. With this knowledge, we can simplify large-file metadata representation significantly. Mostly is…dumb data structures are still fast in memory
  • Now, let’s look at the performance of Conquest. This slide shows the result for PostMark benchmark, which models ISP workload. The graph plots the number of files against the transaction rate. Conquest, represented in dark blue, is compared against ramfs, ext2, reiserfs, and SGI XFS. Ramfs, in the light blue, does not provide persistence, but it is a base case comparison for the quality of Conquest implementation. Ext2, in green, is the most widely used file system in the UNIX world. Reiserfs, in orange, is a journaling file system optimized for small files. SGI XFS, in red, is also a journaling file system, which is based on the IO-Lite technology. As you can see, Conquest is performance is comparable to the performance of ramfs. Compared to other disk-based file systems, Conquest is at least 24% faster. Note that all these file systems are operating in the LRU disk cache. File systems optimized for disk does not take full advantage of memory speed.
  • Now let’s fix the number of files to 10,000, and vary the percentage of large files from 0 to 10 percent. Since the working set is larger than memory, the graph does not include the ramfs. As you can see, when both memory and disk components are exercised, Conquest can be still be several times faster than leading disk-based file systems. Here is the boundary of physical RAM. Since we can’t see the right side of the graph too well, let’s zoom into the graph.
  • When the working set is greater than RAM, Conquest still runs 1.4 to 2 times faster than various disk-based file systems. This improvement is very significant.
  • PowerPoint XP

    1. 1. File System Extensibility and Non-Disk File Systems Andy Wang COP 5611 Advanced Operating Systems
    2. 2. Outline <ul><li>File system extensibility </li></ul><ul><li>Non-disk file systems </li></ul>
    3. 3. File System Extensibility <ul><li>Any existing file system can be improved </li></ul><ul><li>No file system is perfect for all purposes </li></ul><ul><li>So the OS should make multiple file systems available </li></ul><ul><li>And should allow for future improvements to file systems </li></ul>
    4. 4. Approaches to File System Extensibility <ul><li>Modify an existing file system </li></ul><ul><li>Virtual file systems </li></ul><ul><li>Layered and stackable file system layers </li></ul>
    5. 5. Modifying Existing File Systems <ul><li>Make the changes you want to an already operating file system </li></ul><ul><ul><li>Reuses code </li></ul></ul><ul><ul><li>But changes everyone’s file system </li></ul></ul><ul><ul><li>Requires access to source code </li></ul></ul><ul><ul><li>Hard to distribute </li></ul></ul>
    6. 6. Virtual File Systems <ul><li>Permit a single OS installation to run multiple file systems </li></ul><ul><li>Using the same high-level interface to each </li></ul><ul><li>OS keeps track of which files are instantiated by which file system </li></ul><ul><li>Introduced by Sun </li></ul>
    7. 7. / A 4.2 BSD File System
    8. 8. / B 4.2 BSD File System NFS File System
    9. 9. Goals of Virtual File Systems <ul><li>Split FS implementation-dependent and -independent functionality </li></ul><ul><li>Support semantics of important existing file systems </li></ul><ul><li>Usable by both clients and servers of remote file systems </li></ul><ul><li>Atomicity of operation </li></ul><ul><li>Good performance, re-entrant, no centralized resources, “OO” approach </li></ul>
    10. 10. Basic VFS Architecture <ul><li>Split the existing common Unix file system architecture </li></ul><ul><ul><li>Normal user file-related system calls above the split </li></ul></ul><ul><ul><li>File system dependent implementation details below </li></ul></ul><ul><li>I_nodes fall below </li></ul><ul><li>open() and read() calls above </li></ul>
    11. 11. VFS Architecture Block Diagram System Calls V_node Layer PC File System 4.2 BSD File System NFS Floppy Disk Hard Disk Network
    12. 12. Virtual File Systems <ul><li>Each VFS is linked into an OS-maintained list of VFS’s </li></ul><ul><ul><li>First in list is the root VFS </li></ul></ul><ul><li>Each VFS has a pointer to its data </li></ul><ul><ul><li>Which describes how to find its files </li></ul></ul><ul><li>Generic operations used to access VFS’s </li></ul>
    13. 13. V_nodes <ul><li>The per-file data structure made available to applications </li></ul><ul><li>Has both public and private data areas </li></ul><ul><li>Public area is static or maintained only at VFS level </li></ul><ul><li>No locking done by the v_node layer </li></ul>
    14. 14. rootvfs BSD vfs 4.2 BSD File System NFS mount BSD vfs_data … vfs_vnodecovered vfs_next mount
    15. 15. rootvfs BSD vfs 4.2 BSD File System NFS v_node / create root / vfs_data … vfs_vnodecovered vfs_next mount v_data … v_vfsmountedhere v_vfsp i_node /
    16. 16. rootvfs BSD vfs 4.2 BSD File System NFS v_node / v_node A create dir A vfs_data … vfs_vnodecovered vfs_next mount v_data … v_vfsmountedhere v_vfsp i_node / v_data … v_vfsmountedhere v_vfsp i_node A
    17. 17. rootvfs BSD vfs 4.2 BSD File System NFS v_node / v_node A NFS vfs mount NFS vfs_data … vfs_vnodecovered vfs_next mount v_data … v_vfsmountedhere v_vfsp i_node / v_data … v_vfsmountedhere v_vfsp i_node A vfs_data … vfs_vnodecovered vfs_next mntinfo
    18. 18. rootvfs BSD vfs 4.2 BSD File System NFS v_node / v_node A NFS vfs v_node B create dir B vfs_data … vfs_vnodecovered vfs_next mount v_data … v_vfsmountedhere v_vfsp i_node / v_data … v_vfsmountedhere v_vfsp i_node A vfs_data … vfs_vnodecovered vfs_next mntinfo v_data … v_vfsmountedhere v_vfsp i_node B
    19. 19. rootvfs BSD vfs 4.2 BSD File System NFS mount v_node / i_node / v_node A NFS vfs v_node B read root / vfs_data … vfs_vnodecovered vfs_next v_data … v_vfsmountedhere v_vfsp v_data … v_vfsmountedhere v_vfsp i_node A vfs_data … vfs_vnodecovered vfs_next mntinfo v_data … v_vfsmountedhere v_vfsp i_node B
    20. 20. rootvfs BSD vfs NFS vfs v_node / v_node A v_node B i_node / mount 4.2 BSD File System NFS i_node A i_node B mntinfo read dir B vfs_data … vfs_vnodecovered vfs_next vfs_data … vfs_vnodecovered vfs_next v_data … v_vfsmountedhere v_vfsp v_data … v_vfsmountedhere v_vfsp v_data … v_vfsmountedhere v_vfsp
    21. 21. Does the VFS Model Give Sufficient Extensibility? <ul><li>The VFS approach allows us to add new file systems </li></ul><ul><li>But it isn’t as helpful for improving existing file systems </li></ul><ul><li>What can be done to add functionality to existing file systems? </li></ul>
    22. 22. Layered and Stackable File System Layers <ul><li>Increase functionality of file systems by permitting some form of composition </li></ul><ul><ul><li>One file system calls another, giving advantages of both </li></ul></ul><ul><li>Requires strong common interfaces, for full generality </li></ul>
    23. 23. Layered File Systems <ul><li>Windows NT provides one example of layered file systems </li></ul><ul><li>File systems in NT are the same as device drivers </li></ul><ul><li>Device drivers can call other device drivers </li></ul><ul><li>Using the same interface </li></ul>
    24. 24. Windows NT Layered Drivers Example User-Level Process User mode Kernel mode I/O Manager File System Driver Multivolume Disk Driver Disk Driver System Services
    25. 25. Another Approach - UCLA Stackable Layers <ul><li>More explicitly built to handle file system extensibility </li></ul><ul><li>Layered drivers in Windows NT allow extensibility </li></ul><ul><li>Stackable layers support extensibility </li></ul>
    26. 26. Stackable Layers Example LFS VFS Layer File System Calls File System Calls VFS Layer LFS Compression
    27. 27. How Do You Create a Stackable Layer? <ul><li>Write just the code that the new functionality requires </li></ul><ul><li>Pass all other operations to lower levels ( bypass operations) </li></ul><ul><li>Reconfigure the system so the new layer is on top </li></ul>
    28. 28. User File System Directory Layer Directory Layer Compress Layer UFS Layer Encrypt Layer LFS Layer
    29. 29. What Changes Does Stackable Layers Require? <ul><li>Changes to v_node interface </li></ul><ul><ul><li>For full value, must allow expansion to the interface </li></ul></ul><ul><li>Changes to mount commands </li></ul><ul><li>Serious attention to performance issues </li></ul>
    30. 30. Extending the Interface <ul><li>New file layers provide new functionality </li></ul><ul><ul><li>Possibly requiring new v_node operations </li></ul></ul><ul><li>Each layer must be prepared to deal with arbitrary unknown operations </li></ul><ul><li>Bypass v_node operation </li></ul>
    31. 31. Handling a Vnode Operation <ul><li>A layer can do three things with a v_node operation: </li></ul><ul><ul><li>1. Do the operation and return </li></ul></ul><ul><ul><li>2. Pass it down to the next layer </li></ul></ul><ul><ul><li>3. Do some work, then pass it down </li></ul></ul><ul><li>The same choices are available as the result is returned up the stack </li></ul>
    32. 32. Mounting Stackable Layers <ul><li>Each layer is mounted with a separate command </li></ul><ul><ul><li>Essentially pushing new layer on stack </li></ul></ul><ul><li>Can be performed at any normal mount time </li></ul><ul><ul><li>Not just on system build or boot </li></ul></ul>
    33. 33. What Can You Do With Stackable Layers? <ul><li>Leverage off existing file system technology, adding </li></ul><ul><ul><li>Compression </li></ul></ul><ul><ul><li>Encryption </li></ul></ul><ul><ul><li>Object-oriented operations </li></ul></ul><ul><ul><li>File replication </li></ul></ul><ul><li>All without altering any existing code </li></ul>
    34. 34. Performance of Stackable Layers <ul><li>To be a reasonable solution, per-layer overhead must be low </li></ul><ul><li>In UCLA implementation, overhead is ~1-2% per layer </li></ul><ul><ul><li>In system time, not elapsed time </li></ul></ul><ul><li>Elapsed time overhead ~.25% per layer </li></ul><ul><ul><li>Highly application dependent, of course </li></ul></ul>
    35. 35. File Systems Using Other Storage Devices <ul><li>All file systems discussed so far have been disk-based </li></ul><ul><li>The physics of disks has a strong effect on the design of the file systems </li></ul><ul><li>Different devices with different properties lead to different file systems </li></ul>
    36. 36. Other Types of File Systems <ul><li>RAM-based </li></ul><ul><li>Disk-RAM-hybrid </li></ul><ul><li>Flash-memory-based </li></ul><ul><li>MEMS-based </li></ul><ul><li>Network/distributed </li></ul><ul><ul><li>discussion of these deferred </li></ul></ul>
    37. 37. Fitting Various File Systems Into the OS <ul><li>Something like VFS is very handy </li></ul><ul><li>Otherwise, need multiple file access interfaces for different file systems </li></ul><ul><li>With VFS, interface is the same and storage method is transparent </li></ul><ul><li>Stackable layers makes it even easier </li></ul><ul><ul><li>Simply replace the lowest layer </li></ul></ul>
    38. 38. <ul><li>Store files in main memory, not on disk </li></ul><ul><ul><li>Fast access and high bandwidth </li></ul></ul><ul><ul><li>Usually simple to implement </li></ul></ul><ul><ul><li>Hard to make persistent </li></ul></ul><ul><ul><li>Often of limited size </li></ul></ul><ul><ul><li>May compete with other memory needs </li></ul></ul>In-Core File Systems
    39. 39. Where Are In-Core File Systems Useful? <ul><li>When brain-dead OS can’t use all main memory for other purposes </li></ul><ul><li>For temporary files </li></ul><ul><li>For files requiring very high throughput </li></ul>
    40. 40. In-Core File System Architectures <ul><li>Dedicated memory architectures </li></ul><ul><li>Pageable in-core file system architectures </li></ul>
    41. 41. Dedicated Memory Architectures <ul><li>Set aside some segment of physical memory to hold the file system </li></ul><ul><ul><li>Usable only by the file system </li></ul></ul><ul><li>Either it’s small, or the file system must handle swapping to disk </li></ul><ul><li>RAM disks are typical examples </li></ul>
    42. 42. Pageable Architectures <ul><li>Set aside some segment of virtual memory to hold the file system </li></ul><ul><ul><li>Share physical memory system </li></ul></ul><ul><li>Can be much larger and simpler </li></ul><ul><li>More efficient use of resources </li></ul><ul><li>UNIX /tmp file systems are typical examples </li></ul>
    43. 43. Basic Architecture of Pageable Memory FS <ul><li>Uses VFS interface </li></ul><ul><li>Inherits most of code from standard disk-based filesystem </li></ul><ul><ul><li>Including caching code </li></ul></ul><ul><li>Uses separate process as “wrapper” for virtual memory consumed by FS data </li></ul>
    44. 44. How Well Does This Perform? <ul><li>Not as well as you might think </li></ul><ul><ul><li>Around 2 times disk based FS </li></ul></ul><ul><ul><li>Why? </li></ul></ul><ul><li>Because any access requires two memory copies </li></ul><ul><ul><li>1. From FS area to kernel buffer </li></ul></ul><ul><ul><li>2. From kernel buffer to user space </li></ul></ul><ul><li>Fixable if VM can swap buffers around </li></ul>
    45. 45. Other Reasons Performance Isn’t Better <ul><li>Disk file system makes substantial use of caching </li></ul><ul><li>Which is already just as fast </li></ul><ul><li>But speedup for file creation/deletion is faster </li></ul><ul><ul><li>requires multiple trips to disk </li></ul></ul>
    46. 46. Disk/RAM Hybrid FS <ul><li>Conquest File System </li></ul><ul><li>http://www.cs.fsu.edu/~awang/conquest </li></ul>
    47. 47. Hardware Evolution 1990 2000 1 KHz 1 MHz 1 GHz CPU (50% /yr) Memory (50% /yr) Disk (15% /yr) Accesses Per Second (Log Scale) 1995 (1 sec : 6 days) (1 sec : 3 months) 10 5 10 6
    48. 48. Price Trend of Persistent RAM 1995 2005 10 0 Year $/MB (log) 2000 10 -2 10 -1 10 1 10 2 paper/film 3.5” HDD 2.5” HDD 1” HDD Persistent RAM Booming of digital photography 4 to 10 GB of persistent RAM
    49. 49. Conquest <ul><li>Design and build a disk/persistent-RAM hybrid file system </li></ul><ul><li>Deliver all file system services from memory, with the exception of high-capacity storage </li></ul>
    50. 50. User Access Patterns <ul><li>Small files </li></ul><ul><ul><li>Take little space (10%) </li></ul></ul><ul><ul><li>Represent most accesses (90%) </li></ul></ul><ul><li>Large files </li></ul><ul><ul><li>Take most space </li></ul></ul><ul><ul><li>Mostly sequential accesses </li></ul></ul><ul><li>Except database applications </li></ul>
    51. 51. Files Stored in Persistent RAM <ul><li>Small files (< 1MB) </li></ul><ul><ul><li>No seek time or rotational delays </li></ul></ul><ul><ul><li>Fast byte-level accesses </li></ul></ul><ul><ul><li>Contiguous allocation </li></ul></ul><ul><li>Metadata </li></ul><ul><ul><li>Fast synchronous update </li></ul></ul><ul><ul><li>No dual representations </li></ul></ul><ul><li>Executables and shared libraries </li></ul><ul><ul><li>In-place execution </li></ul></ul>
    52. 52. Memory Data Path of Conquest Conventional file systems IO buffer Disk management Storage requests IO buffer management Disk Persistence support Conquest Memory Data Path Storage requests Persistence support Battery-backed RAM Small file and metadata storage
    53. 53. Large-File-Only Disk Storage <ul><li>Allocate in big chunks </li></ul><ul><ul><li>Lower access overhead </li></ul></ul><ul><ul><li>Reduced management overhead </li></ul></ul><ul><li>No fragmentation management </li></ul><ul><li>No tricks for small files </li></ul><ul><ul><li>Storing data in metadata </li></ul></ul><ul><li>No elaborate data structures </li></ul><ul><ul><li>Wrapping a balanced tree onto disk cylinders </li></ul></ul>
    54. 54. Sequential-Access Large Files <ul><li>Sequential disk accesses </li></ul><ul><ul><li>Near-raw bandwidth </li></ul></ul><ul><li>Well-defined readahead semantics </li></ul><ul><li>Read-mostly </li></ul><ul><ul><li>Little synchronization overhead (between memory and disk) </li></ul></ul>
    55. 55. Disk Data Path of Conquest Conventional file systems IO buffer Disk management Storage requests IO buffer management Disk Persistence support Conquest Disk Data Path IO buffer management IO buffer Storage requests Disk management Disk Battery-backed RAM Small file and metadata storage Large-file-only file system
    56. 56. Random -Access Large Files <ul><li>Random access? </li></ul><ul><ul><li>Common definition: nonsequential access </li></ul></ul><ul><ul><li>A typical movie has 150 scene changes </li></ul></ul><ul><ul><li>MP3 stores the title at the end of the files </li></ul></ul><ul><li>Near Sequential access? </li></ul><ul><ul><li>Simplify large-file metadata representation significantly </li></ul></ul>
    57. 57. <ul><li>Conquest is comparable to ramfs </li></ul><ul><li>At least 24% faster than the LRU disk cache </li></ul>PostMark Benchmark <ul><li>ISP workload (emails, web-based transactions) </li></ul>250 MB working set with 2 GB physical RAM
    58. 58. <ul><li>When both memory and disk components are exercised, Conquest can be several times faster than ext2fs , reiserfs , and SGI XFS </li></ul>PostMark Benchmark 10,000 files, 3.5 GB working set with 2 GB physical RAM > RAM <= RAM
    59. 59. <ul><li>When working set > RAM, Conquest is 1.4 to 2 times faster than ext2fs , reiserfs , and SGI XFS </li></ul>PostMark Benchmark 10,000 files, 3.5 GB working set with 2 GB physical RAM
    60. 60. Flash Memory File Systems <ul><li>What is flash memory? </li></ul><ul><li>Why is it useful for file systems? </li></ul><ul><li>A sample design of a flash memory file system </li></ul>
    61. 61. Flash Memory <ul><li>A form of solid-state memory similar to ROM </li></ul><ul><ul><li>Holds data without power supply </li></ul></ul><ul><li>Reads are fast </li></ul><ul><li>Can be written once, more slowly </li></ul><ul><li>Can be erased, but very slowly </li></ul><ul><li>Limited number of erase cycles before degradation </li></ul>
    62. 62. Writing In Flash Memory <ul><li>If writing to empty location, just write </li></ul><ul><li>If writing to previously written location, erase it, then write </li></ul><ul><li>Typically, flash memories allow erasure only of an entire sector </li></ul><ul><ul><li>Can read (sometimes write) other sectors during an erase </li></ul></ul>
    63. 63. Typical Flash Memory Characteristics ~$300/Gbyte Price 15-45 mA active 5-20  A standby Power consumption 500ms/block 100,000 times 64Kbytes Erase cycle Cycle limit Sector size 10  s/byte Write cycle 80-150 ns Read cycle
    64. 64. Pros/Cons of Flash Memory <ul><li>Small, and light </li></ul><ul><li>Uses less power than disk </li></ul><ul><li>Read time comparable to DRAM </li></ul><ul><li>No rotation/seek complexities </li></ul><ul><li>No moving parts (shock resistant) </li></ul><ul><li>Expensive (compared to disk) </li></ul><ul><li>Erase cycle very slow </li></ul><ul><li>Limited number of erase cycles </li></ul>
    65. 65. Flash Memory File System Architectures <ul><li>One basic decision to make </li></ul><ul><ul><li>Is flash memory disk-like? </li></ul></ul><ul><ul><li>Or memory-like? </li></ul></ul><ul><li>Should flash memory be treated as a separate device, or as a special part of addressable memory? </li></ul>
    66. 66. Hitachi Flash Memory File System <ul><li>Treats flash memory as device </li></ul><ul><ul><li>As opposed to directly addressable memory </li></ul></ul><ul><li>Basic architecture similar to log file system </li></ul>
    67. 67. Basic Flash Memory FS Architecture <ul><li>Writes are appended to tail of sequential data structure </li></ul><ul><li>Translation tables to find blocks later </li></ul><ul><li>Cleaning process to repair fragmentation </li></ul><ul><li>This architecture does no wear-leveling </li></ul>
    68. 68. Flash Memory Banks and Segments <ul><li>Architecture divides entire flash memory into banks (8, in current implementation) </li></ul><ul><li>Banks are subdivided into segments </li></ul><ul><ul><li>8 segments per bank, currently </li></ul></ul><ul><li>256 Kbytes per segment </li></ul><ul><li>16 Mbytes total capacity </li></ul>
    69. 69. Writing Data in Flash Memory File System <ul><li>One bank is currently active </li></ul><ul><li>New data is written to block in active bank </li></ul><ul><li>When this bank is full, move on to bank with most free segments </li></ul><ul><li>Various data structures maintain illusion of “contiguous” memory </li></ul>
    70. 70. Cleaning Up Data <ul><li>Cleaning is done on a segment basis </li></ul><ul><li>When a segment is to be cleaned, its entire bank is put on a cleaning list </li></ul><ul><li>No more writes to bank till cleaning is done </li></ul><ul><li>Segments chosen in manner similar to LFS </li></ul>
    71. 71. Cleaning a Segment <ul><li>Copy live data to another segment </li></ul><ul><li>Erase entire segment </li></ul><ul><ul><li>segment is erasure granularity </li></ul></ul><ul><li>Return bank to active bank list </li></ul>
    72. 72. Performance of the Prototype System <ul><li>No seek time, so sequential/random access should be equally fast </li></ul><ul><ul><li>Around 650-700 Kbytes per second </li></ul></ul><ul><li>Read performance goes at this speed </li></ul><ul><li>Write performance slowed by cleaning </li></ul><ul><ul><li>How much depends on how full the file system is </li></ul></ul><ul><ul><li>Also, writing is simply slower in flash </li></ul></ul>
    73. 73. More Flash Memory File System Performance Data <ul><li>On Andrew Benchmark, performs comparably to pageable memory FS </li></ul><ul><ul><li>Even when flash memory nearly full </li></ul></ul><ul><li>This benchmark does lots of reads, few writes </li></ul><ul><ul><li>Allowing flash file system to perform lots of cleaning without delaying writes </li></ul></ul>