CNFTL

CNFTL

Configurable NAND Flash Translation Layer (CNFTL) is designed to provide a way for different vendors to tune up the system for their needs. Four management units, cluster, region, segment, and frame, are introduced for CNFTL. Cluster is used to manage the logical space. Region is designed for mapping from the logical space to the physical space. Segment and frame are introduced to manage the physical space. A cluster consists of sectors. A region comprises virtual blocks, and every virtual block maps to a unique physical block. A physical block is divided into segments. Each segment is partitioned into frames, and each frame is composed of pages. To have CNFTL functioned well, dedicated tables must be introduced.

Cluster Table

The Cluster Table maintains in which segment each cluster resides and is indexed by cluster number. Note that the size of a frame and a cluster are the same. Although a specific segment must be identified by the combination of the region number and the segment number, keeping the segment number is enough for CNFTL. This is because the corresponding region number can be calculated from its cluster number.

Block Table

The mapping from virtual blocks to physical blocks is maintained in the Block Table, which is a two dimensional table. The first dimension is indexed by the region number, and the second dimension is indexed by the virtual block number. Each entry in the Block Table records which physical block is assigned to the corresponding virtual block.

Free Segment Table

For each region, the Free Segment Table records which segment contains at least one free frame and is indexed by the region number. With the Free Segment Table, the searching time for a free frame in a region is greatly reduced.

Block Status Table

The Block Status Table is used to record the status of each physical block in flash memory, such as “free,” “used,” and “reserved.” Status “free” means that the physical block is available to be assigned to a virtual block of any region. Status “used” indicates that the physical block has already been assigned to a virtual block. Status “reserved” suggests that the physical block is either a bad physical block or used for other purposes.

Mapping from an LBA to a Segme

Step 1: When CNFTL is required to find a sector through an LBA, it first translates the given LBA to the cluster number by the floor equation.

Step 2: With the cluster number, the corresponding region number and segment number can be obtained. The region number is calculated from the cluster number by this equation. The segment number is looked up in the Cluster Table.

Step 3: With the segment number, CNFTL determines in which virtual block in the region the segment resides by another floor equation.

Step 4: After getting the region number and the virtual block number, CNFTL searches for the corresponding physical block number in the Block Table.

Step 5: Finally, CNFTL searches the segment sequentially for the requested sector.

Reading of One Cluster

When CNFTL is required to read a cluster, it first looks up the Cluster Table to get the corresponding segment number. With the segment number, CNFTL finds the valid data of the cluster and read data from flash memory.In finding the valid data of the cluster, CNFTL first determines the physical address area where the cluster resides. CNFTL then searches in the segment of the region for the frame containing the valid data of the cluster. The spare area of the first page in a frame is read to check if the frame is “valid” and assigned to the cluster.

Writing of One Cluster

When CNFTL is required to write a cluster, it first determines the corresponding region number from the cluster number. Then, CNFTL tries to find and obsolete the old version of the cluster. The way to find the old version of the cluster is similar to the reading of a cluster, except that CNFTL does not read the data in the frame. Then, CNFTL finds a free frame for writing the cluster. After written the cluster to the free frame, CNFTL marks the frame as the valid frame of the cluster. Finally, CNFTL updates the corresponding entry in the Cluster Table.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”