Design and Implementation of a Simulation Library Using Lightweight Processes