Changes between Version 7 and Version 8 of Developer/FileSystems


Ignore:
Timestamp:
Sep 12, 2008, 10:43:56 AM (11 years ago)
Author:
ChrisJohns
Comment:

Add headings and add the cache details.

Legend:

Unmodified
Added
Removed
Modified
  • Developer/FileSystems

    v7 v8  
    8989# ATA Disk Drives
    9090# RAM Disk
     91# Non-volatile Disk
    9192# Flash Disk
    92 # Non-volatile Disk
     93
     94Block devices are normally accessed using the block device cache.
     95= ATA Disk Drives =
     96
    9397
    9498The ATA Disk Drive support allows an IDE type device to be accessed. The device normally has a Master Boot Record and a partition table. The ATA Disk driver is currently located in libchip. The IDE disk can be a hard disk or a Compact Flash disk in IDE mode.
    9599
    96 The RAM disk allows a fixed sized disk driver to be created in RAM. You can provide the address of the RAM or let the driver allocate the RAM from the heap. If you create a disk from the heap you will need to format it. If you provide the address of the RAM to use it could reside in static RAM and therefore survive a reset. If the RAM is battery backed up then you may consider the Non-volatile or NVDISK driver.
     100The ATA driver is a task that interfaces to a BSP supplied driver loaded into a table. Initialization and mounting of a partition on an ATA disk is a 2 stage process. The Master Boot Record (MRB) is read from the disk and various partition checks. The mounting of a partition requires the selection of a partition and a mount point.
     101= RAM Disk =
    97102
    98 The Flash disk driver or FDISK driver maps a block disk device to flash devices. You can specify the devices and how much of each device to use when creating a disk. The driver will manage the flash sectors/segments and handle the mapping of the disk blocks to the flash devices. The types of flash supported is independent of the flash driver. You define desvice descriptions the flash driver uses. The flash driver is not a flash file system, rather it is a way to map an existing block device file system to flash devices. Currently the flash driver does not support NOR flash devices and does not journal blocks written to the disk. This means you need to manage power failures. Journaling support could be added in the future and if you are interested in supporting this happening please contact OAR Corp.
    99103
    100 The Non-volatile or NVDISK is between the RAM disk and the Flash disk. It provides a one to one mapping of blocks to the device like the RAM disk but it also adds a CRC checksum on each block. The NVDISK drive is suitable for battery backed up static RAM or EEPROM type devices that are byte re-programmable.
     104The RAM disk allows a fixed sized disk driver to be created in RAM. You can provide the address of the RAM or let the driver allocate the RAM from the heap. If you create a disk from the heap you will need to format it. If you provide the address of the RAM to use it could reside in static RAM and therefore survive a reset and may or may not need to formatted. If the RAM is battery backed up you may consider the Non-volatile or NVDISK driver. The RAM disk does not provide any checking on the blocks in RAM. It is the fastest file system.
     105= Non-Volatile Disk =
     106
     107
     108The Non-volatile or NVDISK is similar to the RAM disk who-ever each block has a checksum. It provides a one to one mapping of blocks to the device like the RAM disk but it also adds a CRC checksum on each block. The NVDISK drive is suitable for battery backed up static RAM or EEPROM type devices that are byte re-programmable.
     109= Flash Disk =
     110
     111
     112The Flash disk driver or FDISK driver maps a block disk device to flash devices. You can specify the devices and how much of each device to use when creating a disk. The driver will manage the flash sectors/segments and handle the mapping of the disk blocks to the flash devices. The types of flash supported is independent of the flash driver. You define device descriptions the flash driver uses. The flash driver is not a flash file system, rather it is a way to map an existing block device file system to flash devices. Currently the flash driver does not support NOR flash devices and does not journal blocks written to the disk. This means you need to manage power failures. Journaling support could be added in the future and if you are interested in supporting this please contact OAR Corp.
     113= Block Device Cache =
     114
     115
     116The block device cache is a central cache for all block devices. The cache reads blocks into memory and holds them until the space is needed by another block. Modified blocks are held in memory for a period of time before being flushed to disk. The cache configuration data is:
     117
     118# Number of different size pools
     119# Number of blocks in a pool
     120# Number of read-ahead blocks read
     121# Number of blocks written when writing
     122# Swap Out task priority
     123# Hold time of a buffer
     124
     125A read of a block will attempt to read the read-ahead number of blocks if the cache has the space. This lowers the number of driver transactions when reading a file and allows multi-sector read drivers to take advantage of the extra performance. The cache will not use other blocks in the cache for a speculative read another block.
     126
     127The cache has a swap out task that collects blocks who's hold timer has expired for a specific device and writes them to disk device. Each modified block as an individual timer and the cache can be configured by the driver to only write consecutive blocks helping drivers that support the multi-sector write operations.