Deterministic scheduling is widely used in bug detection, record & replay and deterministic execution systems which all aim to improve the reliability of multithreaded programs. This paper designs and implements a deterministic scheduling framework (DetSF) to support fast development of various deterministic scheduling systems. Based on binary instrumentation, DetSF could control the scheduling (threads' running order) of multi-threaded programs both in fine and coarse granularities. DetSF provides an efficient and easy-to-use interface for upper tools to control the scheduling of multithreaded programs. To better analyze the performance of deterministic scheduling systems, DetSF also provides a profiling subsystem to dynamically collect runtime information. DetSF could be used in quick simulation and comparing of different deterministic execution algorithms. By enforcing a certain scheduling policy, DetSF could also be applied to implement a bug detector which can manifest concurrency bugs. We demonstrate the practicality of DetSF by implementing two existing deterministic algorithms on it. With the support of our framework, it only needs to add a bit line of codes to implement the two algorithms.