Garbage collection is a process that is always working in the background to delete redundant data from applications to free up extra memory space.
The process of garbage collection is supposed to relieve programmers from doing the job manually. However, the CPU consumes a lot of computational power (10% or more) to accomplish automated tasks.
To solve this issue, Martin Maas created a new type of device that “relieves the CPU from its garbage collection duties,” during his Ph.D. at the University of California, Berkeley.
Maas, who now works at Google, notes that CPUs, which are usually tasked with garbage collection, was never specifically designed for it in the first place.
Since CPUs are made to be flexible and run a wide range of applications, they are relatively large and can take up a significant amount of power.
So, Maas and his colleagues designed a compact accelerator unit that requires a lesser chip area and power. This unit can be added to the CPU, just like modern processor chips that are integrated into graphics processing units.
“While the software application is running on the CPU, this unit sits on the side and performs garbage collection for the application,” he explains.
It turns out that this accelerator unit performs garbage collection in a more efficient manner compared to the traditional CPU methods.
This is because CPUs execute garbage collection tasks in a sequential manner, whereas the new accelerator unit takes advantage of the fact such actions can be performed non-sequentially too.
On comparing the accelerator unit to a small CPU core, the team found that their accelerator was 18 times better in performance given each device’s respective sizes. Whereas in terms of power consumption, the accelerator reduced the energy requirement by 15%.
Saving 10% of computation power that CPUs dedicate to garbage collection may not seem like a lot at first glance, but overall it represents a large amount of computing resources.
Also Read: Raspberry Pi-Sized DIY Retro Gaming Console Lets You Relive Childhood