Abstract:With the development of the multi-core technique, multithread programming is widely used in the computer software. Because of non-determinism, it is difficult to debug and test multithreaded programs. Deterministic multithreaded systems make a multithreaded program executed in determinate order and hence present the same result at all time, which is of great benefit to debug and test multithreaded programs. However, deterministic multithreaded systems cause performance decrease severely. This paper presents a novel scheduling method for deterministic multithreaded systems based on long parallel distance priority. This approach always chooses the thread that need to execute the longest parallel codes to be scheduled, and thus the total waiting time of all the threads is reduced. Evaluation shows that the performance is improved by 10% and our approach has high scalability.