Atomic heap transactions and fine-grain interrupts

Olin Shivers, James W. Clark, Roland McGrath
1999 Proceedings of the fourth ACM SIGPLAN international conference on Functional programming - ICFP '99  
Languages such as Java, ML, Scheme, and Haskell provide automatic storage management, that is, garbage collection. The two fundamental operations performed on a garbagecollected heap are "allocate" and "collect." Because the heap is in an inconsistent state during these operations, they must be performed atomically. Otherwise, a heap client might access the heap during a time when its fundamental invariants do not hold, corrupting the heap. Standard techniques for providing this atomicity
more » ... tee have large latencies and other performance problems that impede their application in high-performance, interruptladen, thread-based systems applications. In particular, the standard techniques prevent thread schedulers from switching threads on VM page faults. We cast the space of possible implementations into a general taxonomy, and describe a new technique that provides a simple, low-overhead, low-latency interlock. We have implemented this technique in a version of SML/NJ, and, because of its applicability to thread-based systems, are currently implementing it in the scheduler of our raw-hardware SMLbased kernel, ML/OS. Our technique can be extended to provide other atomic sequences besides storage allocation.
doi:10.1145/317636.317783 dblp:conf/icfp/ShiversCM99 fatcat:ylqsx2jfubcufk4y3gdjlfvafa