12.3
Flash storage:
How is the flash translation table, which is used to map logical page numbers to physical page numbers, created in memory?
Suppose you have a 64-gigabyte flash storage system, with a 4096-byte page size. How big would the flash translation table be, assuming each page has a 32-bit address, and the table is stored as an array?
Suggest how to reduce the size of the translation table if very often long ranges of consecutive logical page numbers are mapped to consecutive physical page numbers.
- How is the flash translation table, which is used to map logical page numbers to physical page numbers, created in memory?
It is stored as an array containing physical page numbers, indexed by logical page numbers.
- Suppose you have a 64-gigabyte flash storage system, with a 4096-byte page size. How big would the flash translation table be, assuming each page has a 32-bit address, and the table is stored as an array?
- Our flash storage system has 64-gigabytes.
- Page size is 4096-bytes.
- Thus the number of pages in our flash storage system is:-
\[ \frac{64 \times 10^9}{4096} = 15,625,000 \]
So, for each of the \(15,625,000\) pages in our flash storage system, their physical address is going to be in the array (flash translation table). You can also think of \(15,625,000\) as the length of our array.
A single address takes 32 bits, which equals, 4 bytes.
Thus the number of bytes that our array will take is:
\[ 15,625,000 \times 4 = 62,500,000 \]
or 62.5 Megabytes.
- Suggest how to reduce the size of the translation table if very often long ranges of consecutive logical page numbers are mapped to consecutive physical page numbers.
If the mapping is such that every p consecutive logical page numbers are mapped to p consecutive physical pages, we can store the mapping of the first page for every p pages. This reduces the in-memory structure by a factor of p. Further, if p is an exponent of 2, we can avoid some of the least significant digits of the addresses stored.