Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (opcode):

Garbage collection, I have a possibly dumb question: Why is it when concurrency is brought up in (most) garbage collection algorithms, the answer is to have a separate nursery for each thread? I can intuitively see that it would be to solve a bottle-necking issue causes by a global lock during allocation, but would not a more simpler solution be to fork then run the mark, and sweep in a secondary (child) process, which then communicates back the data to be freed? This would eliminate the global lock during allocation since the parent process would not have to bother it self with the child, no? So what is the downside? I realize this is a hard question to answer without code, so pointing me to a book that anyone can recommend for garbage collection (algorithms, and design for beginners to this kind of stuff) would be nice, and would be sufficient to answer this question.

OpenStudy (rsmith6559):

I thought that most garbage collection was done by reference count. Try Googling "garbage collection algorithms" and see what you get

OpenStudy (anonymous):

What happens if a second thread asks for memory during a sweep? Does it get blocked until the sweep finishes?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Mari103: How to pop out like a Jacc In the box
7 hours ago 0 Replies 0 Medals
Breathless: Spooky witch but cute
14 hours ago 3 Replies 0 Medals
Arriyanalol: help
14 hours ago 10 Replies 2 Medals
Arriyanalol: @tinydinoUwU stop trying to find a argument u blad lil boy
1 day ago 5 Replies 4 Medals
Jaded012023: Please tell me what you all think of this song
17 hours ago 6 Replies 1 Medal
Arriyanalol: bro how
17 hours ago 2 Replies 3 Medals
Arriyanalol: cant wait for the new bluey movie in 2027
1 day ago 12 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!