Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
In recent years, flash memory has more capacity and a lower price. It makes flash memory more suitable for portable consumer electronics. For example, most digital music players work with NAND flash memory. Now, makers of smart phones and portable game players use the flash memory technology or plan to exploit it in the near future because it has many attractive features such as small size, shock resistance, high reliability, low power consumption, and lightweight .Typical portable consumer electronics such as cellular phones and digital music players contain DRAM, NOR flash and NAND flash memory. DRAM is used for a main memory, NOR flash memory is used for a program code, and NAND flash memory is used for user data. Because the portable consumer electronics contain three kinds of memory, it is difficult to cut down the cost of hardware and reduce the size of the portable consumer electronics. In order to reduce the cost and size, it has been attempted to eliminate NOR flash memory from the portable consumer electronics. Since the portable consumer electronics does not contain NOR flash memory, the application program code needs to be copied from NAND flash memory to the main memory during running the application. This processing mechanism is called "shadowing." The shadowing shows the best performance at runtime because the whole program codes reside in the main memory. However this mechanism needs a longer loading time since the whole program code should be copied to the main memory. Besides, the main memory should become large because the application codes such as mobile games become large in recent years. To address the weakness of the shadowing, demand paging is exploited for the portable consumer electronics. Demand paging is a virtual memory technique that code or data is loaded from the secondary storage only when it is needed by a process. Thus, it requires a less main memory capacity and a shorter loading time than the shadowing mechanism. Furthermore, the portable consumer electronics using demand paging can exploit a swapping mechanism to extend a limited main memory space because the mobile game codes become large in recent years. Since the swapping frequently performs read and write operations to the swap space, there are many invalid pages in NAND flash
Seminar Report
memory. Thus the portable consumer electronics should often perform the garbage collection operation which translates invalid pages to free pages. In NAND flash memory, especially, the number of erase operation is limited to about 100,000 times. Because of this reason, an efficient garbage collection policy should be developed for NAND flash memory based swap system. This paper proposes a new garbage collection policy for the portable consumer electronics with swapping mechanism. The proposed garbage collection policy focuses on minimizing the garbage collection time, reducing the energy consumption, and extending the lifetime of NAND flash memory to improve a performance of portable consumer electronics. Trace-driven simulations show that the proposed policy performs better than the existing garbage collection such as the Greedy, the Cost-benefit (CB), and the Cost Age Time (CAT) policies in terms of the garbagecollection time, the number of erase operations, the energy consumption, and the endurance of flash memory. The remainder of this paper is organized as follows. Describes the physical characteristics of NAND flash memory and then analyzes existing works on garbage collection. It presents a new swap space management scheme for NAND flash memory based swap system. Then, performance evaluation results of the proposed policy are given. finally concludes the paper. This paper presents a novel swap space management scheme, which is specifically designed for NAND flash memory based portable consumer electronics such as digital music players, portable game players, and smart phones. To manage the swap space efficiently, this paper proposed the new garbage collection policy for the portable consumer electronics. The proposed policy has three features important in NAND flash memory based swap systems: (1) long endurance of NAND flash memory, (2) quick garbage collection, and (3) low energy consumption. In order to minimize the garbage collection time, reducing the energy consumption, and extend the lifetime of the NAND flash memory, the proposed policy considers the invalidation time of invalid pages, the swapped-out time of valid pages,and the erase count of flash blocks. As a result, the proposed garbage collection policy performs better than other existing garbage collection policies in terms of the number of erase operations, the garbage collection time, total amount of energy consumption and the endurance of NAND flash memory
Seminar Report
Fig. 1. Demand paging and shadowing in NAND flash memory. Since the portable consumer electronics does not contain NOR flash memory, the application program code needs to be copied from NAND flash memory to the main memory during running the application. This processing mechanism is called "shadowing." The shadowing shows the best performance at runtime because the whole program codes reside in the main memory. However this mechanism needs a longer loading time since the whole program code should be copied to the main memory. Besides, the main memory should become large because the application codes such as mobile games become large in recent years. To address the weakness of the shadowing, demand paging is exploited for the portable consumer electronics. Demand paging is a virtual memory technique that code or data is loaded from the secondary storage only when it is needed by a process. Thus, it requires a less main memory capacity and a shorter loading time than the shadowing mechanism.
2. LITERATURE REVIEW
Department of Computer Science and Engg. JCET
This section describes some important characteristics of flash memory specially focusing on the viewpoint of garbage collection and analyzes existing garbage collection policies .
based embedded systems. To relieve this problem, the software layer of a flash memory device usually contains wear-leveling mechanism that controls the erase count of all blocks as evenly as possible
Seminar Report
16.2 6.8 64
108 8.2 64
Seminar Report
scenario 2 selects block 3 that owns only one valid page as a victim block and copies out the valid page to block 7. Then it erases block 3 to make a free block. After erasing block 3, it selects block 5, copies out the valid pages, and erase block 3. Hence, the garbage collector performed two write operations and two erase operations in scenario 2. Though scenario 2 performed less write and erase operations than scenario 1, it made five used blocks (block 1, 2, 4, 6, and 7) and four free blocks (block 3, 4, 8, and 9). This is because scenario 2 selected a block with the least number of valid pages as the victim block.
Seminar Report
collection policies in log-based disk storage also can be applied to NAND flash memory based storage systems. Wu etal. proposed the Greedy policy for garbage collection [5]. The Greedy policy considers only valid data pages in blocks to reduce write cost and chooses the block with the least utilization. However it dose not consider wear-leveling. Therefore, it was shown to perform well for random localities of reference, but it was shown to perform poorly for high localities of reference. Kawaguchi et al. proposed the cost benefit policy. The cost-benefit policy evaluates the cost benefit of all blocks in flash memory using ((a*(1-u))/2u)method, where a is the elapsed time from the last data invalidation on the block, and u is the percentage of fullness of the block. After evaluating the all blocks, it chooses the victim block that has a maximum cost benefit value. Chiang etal. proposed the Cost Age Time (CAT) policy [7]. The CAT policy focuses on reducing the number of the erase operation .To reduce the number of the erase operations, they use a data redistribution method that uses a fine-grained method to separate cold and hot data. The method is similar to the cost benefit policy but operates at the granularity of pages. Furthermore, the CAT policy considers wear-leveling. To perform even-leveling, the CAT chooses the victim block according to cleaning cost, ages of data in blocks, and the number of the erase operations. Kim et al. proposed the cleaning cost policy, which focuses on lowering cleaning cost and evenly utilizing flash memory blocks. In this policy, they dynamically separates cold data and hot data and periodically move valid data among blocks so that blocks have more even life times .Chang et al. proposed the real-time garbage collection policy, which provides a guaranteed performance for hard real-time systems . They also resolved the endurance problem by the wear-leveling method. The characteristics of the various garbage collection policies are summarized in Table II.
SAGC
How to select the victim
GREEDY Select the block with the minimum utilization Utilization = total of pages
COST BENEFIT Select the block with the maximum cost benefit value Cost benefit = u au
COST AGE TIME Select the block with the minimum value Value = CT u age u
Seminar Report
n i i agei 1 _ i_agei = c_time i_timei c_time : the current time i_timei : the invalidation time of PAGE I O
1 1 u : the utilization of the block age : the elapsed time from the last data update CT : the number of erase operation
Wear-leveling Characteristic s
X * Simple * No wearleveling
O * Classifying the block as hot or cold * Redistributing the pages in the victim block * wear-leveling
* Considering the swap system * Redistributing the pages in the victim block * Efficient free block list management * Wear-leveling
III. SWAP SPACE MANAGEMENT TECHNIQUE Portable consumer electronics using demand paging exploit a swapping mechanism to extend a limited main memory space. The swapping mechanism frequently performs read,write and erase operations to the swap space. Specifically, in flash memory, write and erase operations are even slower and also need more energy than a read operation. Thus, the write and erase operations are dominant to I/O performances of flash memory based swap systems. As mentioned in Section II, existing garbage collection policies try to reduce the number of write and/or erase operations to improve I/O performances. This paper, therefore, proposes the new garbage collection policy to manage the swap space efficiently for the portable consumer electronics. The proposed policy considers the swapping I/O characteristics for NAND flash memory based swap system. Thus, the proposed garbage collection policy is named Swap Aware Garbage Collection (SAGC). In order to improve the performance, the
Seminar Report
proposed garbage collection policy tries to reduce the number of the write and erase operations and also considers the wear-leveling for the endurance of NAND flash memory.
Seminar Report
write operations, it could minimize the garbage collection time. However, since the Greedy policy does not consider wear-leveling, it shows poor performance terms of the endurance
Seminar Report
of NAND flash memory for references with high spatial locality. To address the problems, theproposed policy considers the invalidation time of invalid pages, the swapped-out time of valid pages, and the erase count of flash blocks. When garbage collection is needed, the proposed policy calculates the Cost with Age Value (CAV) of each block, and selects the block with the largest CAV as the victim block. The CAV of a block is computed as
n
CAV= i_age i i=1 i_agei = c_time i_timei here n is the number of invalid pages in a block, c_time is current time, and i_timei is time when the status of page i is changed to invalid. Hence, i_agei is the elapsed time since page i becomes invalid. If there are many invalid pages in a block, the CAV of the block is large because i_ages of all invalid pages are added. Since the garbage collector selects the block with the largest CAV as the victim block, this reduces the copy-out cost of valid pages. On the other hand, even if a certain block has only one invalid page, the i_age of the page could be large enough if the page was invalidated long time ago. In this case, the CAV of the block becomes large and it can be selected as the victim. This eventually improves wear-leveling of the flash memory. After calculating the CAV of each block, the proposed garbage collection policy selects several victim blocks with the largest CAV and then copies valid pages in the victim blocks to free blocks. In this procedure, redistribution of valid pages is performed. For the redistribution of the valid pages, the proposed policy considers the Elapsed Swapped out Time (EST) of the valid page. The EST of each valid page is computed as ESTi = c_time s_timei (2)
where c_time is current time, and s_timei is time when page i is swapped out from the main memory. Hence, ESTi is the elapsed time since page i swapped out from the main memory.
Seminar Report
Because the current operating systems use the round-robin based process scheduling scheme, the least recently swappedout page is likely to swap in the main memory in the near future .
Thus, the least recently swapped-out page is classified as hot page in the proposed policy. The proposed policy could get the hot valid pages together into a block
Seminar Report
during redistributing because the proposed policy sorts the valid pages by the EST value, and then copies out the least recently swapped-out page first. Fig. 4 shows the redistribution of the valid pages during garbage collection
Swap_in() {
Seminar Report
Mark the obsolete page as invalid in the swap area } Garbage_Collection() { Calculate the CAV of all blocks; Select several victim blocks with the largest CAV; For all valid data pages in the victim blocks { Calculate the EST value of valid pages Sort the valid pages by the EST value; Copy the page with the largest EST value into the active block first; } Erase the victim blocks; Add the erased blocks to the free block list; Sort the blocks in the free block list by the number of erase operations; } Fig. 5. Operations for NAND flash memory based swap system.
Seminar Report
IV. PERFORMANCE EVALUATION This section presents the performance evaluation results for various garbage collection policies to assess the effectiveness of the proposed policy. Trace-driven simulation with synthetic traces was conducted to compare the performance of the proposed policy with those of the Greedy, the Cost-benefit (CB), and the Cost Age Time (CAT) policies. It used the synthetic traces to assess the performance of the NAND flash memory based swap system. Since the operating systems swap out many pages in a short period of time, this swap pattern was considered to generate the synthetic traces . The simulation used the performance specification of NAND flash memory producing by Samsung Electronics to calculate the garbage collection time and the total amount of energy consumption when garbage collection is performed Table III shows the performance of NAND flash memory. To evaluate the performance, when the size of free block is fewer than 10% of the total size of flash memory, garbage collection is started. TABLE III PERFORMANCE AND ENERGY CONSUMPTION OF FLASH MEMORY Performance (s) Energy
Seminar Report
And garbage collection is stopped when the size of free block is larger than 20% of the total size of flash memory. Fig. 8 and Fig. 9 show the performance results of the number of erase operation and pages copied out for the four garbage collection policies. Because garbage collection performs a lot of page write and block erase operations, the garbage collection policy should reduce the number of erase operation and pages copied out to improve the performance of the NAND flash memory swap based system. The proposed policy, SAGC shows better performance in these performance results, and these results affect the performances of the garbage collection time and total amount of energy consumption. Fig. 10 and Fig. 11 show the garbage collection time and total amount of energy consumption during simulation. The SAGC policy shows better performance in terms of the garbage collection time and total amount of energy consumption. This is because the SAGC policy just considers the utilization of each block to minimize the garbage collection time and total amount of energy consumption unlike other policies.
Seminar Report
Fig. 7. Number of the erase operations. Furthermore, the proposed policy performs better than the original Greedy policy because it consider the Swapped-Out Time (SOT) of each page and exploits the SOT value to redistribute the valid pages. The SAGC policy shows better performance in terms of the garbage collection time and total amount of energy consumption. Finally,. In these results, the SAGC policy shows the best performance in terms of the number of the worn-out blocks due to the efficient free block list management. This result means that the proposed policyguarantees the long endurance of NAND flash memory
Seminar Report
Seminar Report
Seminar Report
This paper presents a novel swap space management scheme, which is specifically designed for NAND flash memory based portable consumer electronics such as digital music players, portable game players, and smart phones. To manage the swap space efficiently, this paper proposed the new garbage collection policy for the portable consumer electronics. The proposed policy has three features important in NAND flash memory based swap systems: (1) long endurance of NAND flash memory, (2) quick garbage collection, and (3) low energy consumption. In order to minimize the garbage collection time, reducing the energy consumption, and extend the lifetime of the NAND flash memory, the proposed policy considers the invalidation time of invalid pages, the swapped-out time of valid pages,and the erase count of flash blocks. As a result, the proposed garbage collection policy performs better than other existing garbage collection policies in terms of the number of erase operations, the garbage collection time, total amount of energy consumption and the endurance of NAND flash memory
4. REFERENCES
Department of Computer Science and Engg. JCET
Seminar Report
[1] IEEE Transactions on Consumer Electronics, Vol. 56, No. 3, August 2010
[2] http\www,ieee Xplore.xcom [3] [4] Rosenblum, M., Ousterhout, J. K., The Design and Implementation of a LogBlackwell, T., Harris, J., Seltzer, M., Heuristic Cleaning Algorithms in LogStructured FileSystem, ACM Transactions on Computer Systems, Vol. 10, No. 1, 1992. Structured File Systems, Proceedings of the 1995 USENIX Technical Conference, Jan. 1995. [5] Matthews, J. N., Roselli, D., Costello, A. M., Wang, R. Y., Anderson, T. E., Improving the Performance of Log-Structured File Systems with Adaptive Methods, Proceedings of the Sixteenth ACM Symposium on Operating System Principles, 1997
ABSTRACT
Department of Computer Science and Engg. JCET
Seminar Report
Flash memory has more capacity and a lower price. It makes flash memory more suitable for portable consumer electronics. Portable consumer electronics such a stable PC and smart phones use NAND flash memory as a secondary storage because it has many attractive features such as small size, fast access speeds, and light weight. The portable consumer electronics with NAND flash memory exploit a demand paging to run applications, and also use a swapping to extend a limited main memory space .However, if the portable consumer electronics use NAND flash memory as swap space, it should perform garbage collection, which is a time-consuming operation. Therefore, in order to manage swap space efficiently, this work presents a novel garbage collection policy for the portable consumer electronics with a swap system. The proposed policy has three features important in NAND flash memory based swap systems: (1) long endurance of NAND flash memory, (2) quick garbage collection, and (3) low energy consumption. In order to minimize count of flash blocks. As a result, the proposed garbage collection policy
performs better than other existing garbage collection policies in terms of the number of erase operations, the garbage collection time the garbage collection time, reducing the energy consumption, and extend the lifetime of the NAND flash memory, the proposed policy considers the invalidation time of invalid pages, the swapped-out time of valid pages ,and the erase c, total amount of energy consumption and the endurance of NAND flash memory
Seminar Report
1.
2.
LITERATURE REVIEW 2.1 RELATED WORKS CHARACTERISTICS OF NAND FLASH 2.1.1 MEMORY EXISTING WORKS ON GARBAGE 2.1.2 COLLECTION SWAP SPACE MANAGEMENT 2.2 TECHNIQUE 2.2.1 GENERAL NAND FLASH MEMORY BASED SWAP SYSTEM BLOCK RECYCLING FOR SWAP SPACE FREE BLOCK MANAGEMENT FOR SWAP SPACE
4 7 9
2.2.2
2.2.3
10
13 15 20 21
PERFORMANCE EVALUATION