1. A data processing system comprising: a plurality of data processing devices configured to execute a plurality of threads; and a processor configured to: assign a plurality of first threads to the plurality of data processing devices that include a first data processing device, using a first scheduling method; calculate, when new tasks are assigned to the data processing devices, a first execution period resulting when a plurality of second threads that include new threads and the first threads are scheduled using the first scheduling method; calculate a second execution period resulting when the second threads are scheduled using a second scheduling method different from the first scheduling method; and select based on a result of comparison of the first execution period and the second execution period, any one among the first scheduling method and the second scheduling method to assign the second threads to the data processing devices.