Research Article
ReHypar: A Recursive Hybrid Chunk Partitioning Method Using NAND-Flash Memory SSD
Algorithm 1
The procedure for the file allocation in ReHypar.
ALLOCATE (input: a new file ) | (1) if (≥ s) { | (2) assign m () number of clean extents to ; | (3) // let be the last extent allocated to and pos be the last block position. | (4) call MAP(pos); | (5) // let and be the chunk index and level where the next file allocation takes place. | (6) connect to the linked list associated to chunk in | (7) } | (8) else { | (9) = the first extent connected to each linked list in ; | (10) among extents in , choose an extent in which the unused space beginning | from chunk is at least and the ratio of to is the minimum; | (11) assign to , starting from chunk ; | (12) call MAP to calculate the next chunk where the next file allocation occurs; | (13) // let and be the outputs of MAP. | (14) connect to the linked list associated to chunk in ; | (15) } | MAP (input: the last block position pos allocated on E) | (1) compute such that ≤ ; ; | (2) if () { | (3) // return the next chunk index and partitioning level. | (4) ; return | (5) } | (6) while () { | (7) L++; | (8) find such that (); | (9) if () { | (10) // return the next chunk index and partitioning level. | (11) ; return | (12) } | (13) ; | (14) } |
|