A Comparison of Scalable Multi-Threaded Stack Mechanisms - Moore-Oliva, Joshua I. (My University, 2010)
The traditional "stack grows from the top, heap grows from the bottom" memory layout allows a single-threaded process to make use of all available address space. This layout is not ideal when multiple threads of execution need to share one address space, for memory exhaustion is no longer signified by the heap meeting the stack. In the commonly used multi-threaded memory layout where each thread has its "worst case" stack memory exclusively reserved, a process may prematurely run out of memory when one thread's stack collides with another's, even if there is unused address space elsewhere. This problem is exacerbated as the number of threads in a process increases since there is less stack space available per thread.
In this thesis, alternative stack mechanisms that attempt to alleviate this problem are reviewed, and a new stack mechanism is put forward that utilizes the MMU to detect stack overflow. An experimental compiler implementing a subset of the C language is used to implement promising stack mechanisms, and a suite of test programs are used to compare their performance and scalability under varying usage patterns.
Keywords: Computing and Software; Computer Engineering; Computer Sciences; Software Engineering; Computer Engineering