M # Mは ノ ー ド 数 while k > 0: c = nodes [ i ] . color // atomic i f c == GRAY: k = M for side in range ( 2 ) : succ := nodes [ i ] . successors [ side ] // atomic // begin atomic i f succ . color == WHITE: succ . color = GRAY // end atomic nodes [ i ] . color = BLACK // atomic else : k −= 1 i = ( i + 1) % M 15
ード を白にする for i in range (m) : color := nodes [ i ] . color // atomic i f color == WHITE: f r e e _ l i s t . append( nodes [ i ] ) // atomic else : // color == BLACK nodes [ i ] . color = WHITE // atomic このフェーズには、 灰色のノ ード はない 16
an exercise in cooperation''. In: Commun. ACM 21.11 (Nov. 1978), pp. 966–975. issn: 0001-0782. doi: 10.1145/359642.359655. url: https://doi.org/10.1145/359642.359655. [2] Richard Hudson. Getting to Go: The Journey of Go's Garbage Collector. 2018. url: https://go.dev/blog/ismmkeynote. [3] Richard Hudson. Go GC: Latency Problem Solved. 2015. url: https://go.dev/talks/2015/go-gc.pdf. [4] Richard Hudson. Go GC: Prioritizing low latency and simplicity. 2015. url: https://go.dev/blog/go15gc. 19