Garbage Collection (GC)

When deleting files, the OS does not just erase the files from the hard disc but also marks them as “ineffective” data, which may be written over or erased in the future. In a conventional HDD, such ineffective data will be directly written over with new data. In SSDs with Blocks as the unit of erasure, the effective data in the Block would first be duplicated and integrated into another available Block before the ineffective data can be erased to form a Free Block. This mechanism is called Garbage Collection (GC).