US 12,008,399 B2
Optimization for scheduling of batch jobs
Xi Bo Zhu, Beijing (CN); Shi Yu Wang, Beijing (CN); Xiao Xiao Pei, Beijing (CN); Qin Li, Shanghai (CN); and Lu Zhao, Beijing (CN)
Assigned to International Business Machines Corporation, Armonk, NY (US)
Filed by International Business Machines Corporation, Armonk, NY (US)
Filed on Dec. 15, 2020, as Appl. No. 17/121,934.
Prior Publication US 2022/0188148 A1, Jun. 16, 2022
Int. Cl. G06F 9/48 (2006.01)
CPC G06F 9/4881 (2013.01) [G06F 2209/484 (2013.01)] 15 Claims
OG exemplary drawing
 
1. A computer-implemented method, comprising:
obtaining, by one or more processors,
a set of batch jobs,
connection relationships among batch jobs in the set of batch jobs, and
a respective execution time of each batch job in the set of batch jobs;
generating, by the one or more processors, a directed weighted graph for the set of batch jobs, wherein in the directed weighted graph, a node represents a batch job, a directed edge between two of the nodes represents a directed connection between two corresponding batch jobs, a weight of the node represents the execution time of the batch job corresponding to the node;
obtaining, by the one or more processors, information of consumption of same resource(s) among the batch jobs in the set of batch jobs to obtain related batch jobs consuming the same resource(s) in the set of batch jobs;
optimizing, by the one or more processors, the directed weighted graph based on the information of consumption of same resource(s) among the batch jobs in the set of batch jobs;
determining, by the one or more processors, whether the related batch jobs are parallel batch jobs according to the optimized directed weighted graph for the set of batch jobs, and if the related batch jobs are not parallel batch jobs and consume the same resource(s) concurrently, further optimizing the directed weighted graph to prevent concurrent consumption of the same resources;
arranging, by the one or more processors, the batch jobs into a plurality of batch job sequence arrangements;
calculating, by the one or more processors, respective total execution time of the set of batch jobs for respective batch job sequence arrangements;
selecting, by the one or more processors, a batch job sequence arrangement with a minimum total execution time of the set of batch jobs as a batch job sequence used in the further optimized directed weighted graph; and
executing the processing of the batch jobs according to the batch job sequence arrangement, the executing including, for each batch job, causing one or more of the resources to be locked while the batch job is being executed to prevent other batch jobs from consuming the same resources, and then causing the resources to be released after the respective batch job is completed, wherein the information of consumption of same resources among the batch jobs in the set of batch jobs is represented as a resource consumption matrix (RCM), wherein the RCM is anxn matrix, n is a number of batch jobs in the set, an element in an i-th row and a j-th column of the RCM indicates a situation that an i-th batch job and a j-th batch job consume resources.