Concurrent and Stop-the-world collection algorithm
Concurrent and Stop-the-world collection algorithm
In concurrent collections two or more garbage collections are executed simultaneously while the application is in running state. But in this concurrent collection extra care need to take as it is performing collection on live running application. Because object might get updated while the collection is running.
In stop-the-world collection the whole application is stop and suspended while the collection is performed. It is simple than the concurrent collection because the application is stop and heap is freeze and no objects are changing while the collection is perform. But is has disadvantage that some applications may not want to be paused.