semispace works by maintaining two disjoint areas


Semispace works by maintaining two disjoint areas from which memory can be allocated. These areas are called the from-space and the to-space. At ?rst, the algorithm allocates memory only from the from-space, without ever worrying about garbage collection. Allocation then is typically performed using simple pointer bumping, which simpli?es the whole process a lot. When we ?nally run out of space in the from-space, we sweep through all allocated objects that can be somehow reached; those are the ones that are still live. We then move each of these live objects to the to-space, taking care to update all pointers to the live objects to point to its new location in the to-space. Hence semispace is called a copying collector. After having done all this moving, only live objects are in the to-space. From this moment on, we can start using the to-space to perform allocation. The process is repeated again when the to-space eventually runs out of space. Thismethod has as advantages the fact that it might "compact" objects in the memory, thus increasing locality and minimizing fragmentation. Also, when performing allocation from one of the spaces, it can use simple pointer bumping, which is very fast. However, this approach doubles the memory requirements.

Request for Solution File

Ask an Expert for Answer!!
Operating System: semispace works by maintaining two disjoint areas
Reference No:- TGS0210558

Expected delivery within 24 Hours