Proposed is a swap-aware garbage collection policy, called SCATA, for a flash-aware Linux swap system. SCATA not only introduces an improved victim block selection method to reduce cleaning cost and improve the degree of wear-levelling, but also redefines the concept of hot page and cold page according to the least-recently-used page replacement algorithm and clusters hot pages separately from cold pages, and then redistributes them to different free blocks during the migration step of garbage collection operation to reduce cleaning cost and obtain much more free space. Swap I/O traces from the Linux kernel have been collected and trace-driven simulations performed, which show that the proposed policy greatly outperforms existing garbage collection policies.Introduction: As a result of the limited memory resource of embedded systems, embedded systems exploit an efficient Linux swap system [1 -3] considering flash memory as swap storage as a cost-effective solution to extend limited memory space. All write operations of flash-memorybased swap storage are requested during the page replacement operation. Since a page slot of which the size is 4 K bytes is always allocated to accommodate the page swapped out from main memory during the page replacement operation and out-of-place update scheme is adopted to solve the erase-before-write constraint of flash memory, the flashmemory-based swap area is always used up in a short period of time. In this case, an efficient garbage collection policy for the Linux swap system considering flash memory as swap storage is needed to reclaim garbage and obtain free blocks.The cleaning cost and the degree of wear-levelling are two primary concerns of a garbage collection policy. Namely, an efficient garbage collection policy should minimise the cleaning cost of garbage collection and wear down all blocks as evenly as possible. A number of garbage collection policies have been studied. Wu et al. proposed the greedy algorithm (GR) [4] to select victim blocks with the least utilisation for erasure, hoping to obtain free space as much as possible with the least cleaning cost. The greedy algorithm can be implemented simply, but does not consider the degree of wear-levelling. The cost-benefit algorithm (CB) [5] proposed by Kawaguchi et al. adopts the benefit-cost ratio used in the formal discipline of cost-benefit analysis to choose victim blocks with highest benefit-cost for erasure. Chiang et al. proposed the cost age time (CAT) policy [6], which extends CB by considering the erasure count of each block during the selection of victim blocks in order to improve the degree of wear-levelling. To reduce cleaning cost and reclaim the largest amount of invalid pages to obtain the largest amount of free space, the CAT policy clusters hot pages separately from cold pages and redistributes them to different free blocks during the migration step of the garbage collection operation. Han et al. proposed the cost-agetime with age-sort (CATA) algorithm [7] for which the selection method of victim bloc...