Foundations of Multithreaded, Parallel, and Distributed Programming