Executing subordinate activities by pushing return addresses on the stack is the most efficient working mode for sequential programs. It is supported by all current processors, yet in most cases is inappropriate for parallel execution of indepented threads of ocntrol. This paper describes an approach of dynamically switching between efficient on-stack exection of sequential threads and off-stack spawning of parallel activities. The presented method allows to incorporate work-stealing into the scheduler, letting the system profit from its near-to-optimal load-balancing properites.
展开▼