due to these code lines, stw in one gc cycle may happen more than 2 times. so stw times in one gc cycle could be 2(general), 3, 4, .... and even for ever?
Ian Lance Taylor
unread,
Jun 7, 2021, 6:00:11 PM6/7/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Theoretically, yes. In practice, this is not a problem.
Ian
Rick Hudson
unread,
Jun 12, 2021, 9:30:14 AM6/12/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
It won't go on forever. The formal proofs are in the original Sapphire and distributed Train algorithm papers. Informally the proofs show that there is no way to create a new white object, no way to pass white object between threads more than a bounded number of times, reachable non-black objects are bounded, and each loop discovers and extinguishes at least one non-black reachable object.
Richard L. Hudson and J. Eliot B. Moss, ``Sapphire: Copying GC Without Stopping the World,'' Concurrency and Computation: Practice and Experience, Volume 15, Issue 3-5, pp. 223-261, John Wiley and Sons, 2003. http://dx.doi.org/10.1002/cpe.712.