Job scheduling method, apparatus and device, medium and program product
By determining the target logical partition based on the target hash value of the job to be submitted and the current number of logical partitions on the large host and scheduling and execution, the problem of resource imbalance in concurrent job scheduling is solved, and efficient resource utilization and automatic scheduling are achieved.
Patent Information
- Application Number
- CN202411933596.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-22
AI Technical Summary
On large hosts, it is difficult to achieve balanced allocation of resources for a large number of concurrent jobs, resulting in unbalanced resource utilization of host resources. Especially when the number of jobs is huge, setting up a scheduling environment is time-consuming and labor-intensive.
By obtaining the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current time, the target logical partition of the job to be submitted is determined and scheduled to the partition for execution, so that the number of jobs running on each logical partition is equivalent.
It realizes balanced allocation of host resources, improves resource utilization, avoids transaction timeout problems caused by insufficient resources, and does not need to set up a scheduling environment and automatically schedule, reducing labor costs.
Smart Images

Figure CN119862013A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the fields of financial technology and computer technology, and in particular to a job scheduling method, apparatus, equipment, medium and program product. Background Art
[0002] There are often a large number of jobs executed concurrently on large mainframes. If a host logical partition executes a large number of jobs, it is easy to fill up the resources of the logical partition, causing the online transaction running on the logical partition to time out, affecting normal transaction processing.
[0003] In the related art, the scheduling environment is usually set to control which logical partition a job runs on. Although the above method can realize resource scheduling to a certain extent, it is difficult to achieve balanced distribution of concurrent jobs on each logical partition, resulting in uneven utilization of host resources; especially when the workload is huge, setting the scheduling environment is extremely time-consuming and labor-intensive.
[0004] Therefore, how to schedule and allocate a large number of concurrent jobs to fully utilize host resources is a problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a job scheduling method, apparatus, device, medium and program product. For each job to be submitted, the job to be submitted can be scheduled to be executed on a target logical partition, so that the number of jobs running on each logical partition of the host is equal, solving the scheduling problem of a large number of concurrent jobs on the host, thereby making full use of the host resources.
[0006] In a first aspect, an embodiment of the present application provides a job scheduling method, the method comprising:
[0007] Get M jobs to be submitted, where M is an integer greater than or equal to 1;
[0008] For each job to be submitted, if there is no preconfigured scheduling environment and / or preconfigured logical partition for the job to be submitted, determine the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one of the preconfigured logical partitions corresponding to the job to be submitted;
[0009] The job to be submitted is scheduled to the target logical partition, so that the target logical partition executes the job to be submitted.
[0010] In a second aspect, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the job scheduling method described in any embodiment of the present application.
[0011] In a third aspect, an embodiment of the present application further provides a job scheduling device, the device comprising:
[0012] A first acquisition module is used to acquire M jobs to be submitted, where M is an integer greater than or equal to 1;
[0013] A determination module, for each job to be submitted, when the job to be submitted does not have a preconfigured scheduling environment and / or a preconfigured logical partition, determining a target logical partition corresponding to the job to be submitted in the preset logical partition list based on a target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one of the preconfigured logical partitions corresponding to the job to be submitted;
[0014] The first scheduling module is used to schedule the job to be submitted to the target logical partition, so that the target logical partition executes the job to be submitted.
[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, including:
[0016] one or more processors;
[0017] a memory for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the job scheduling method described in any embodiment of the present application.
[0019] In a fifth aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the job scheduling method described in any embodiment of the present application is implemented.
[0020] The embodiment of the present application proposes a method, device, equipment, medium and program product for job scheduling, obtaining M jobs to be submitted, where M is an integer greater than or equal to 1; for each job to be submitted, in the case where the job to be submitted does not have a preconfigured scheduling environment and / or preconfigured logical partition, based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, determine the target logical partition corresponding to the job to be submitted in the preset logical partition list; the preconfigured scheduling environment is used to indicate at least one preconfigured logical partition corresponding to the job to be submitted; the job to be submitted is scheduled to the target logical partition so that the target logical partition executes the job to be submitted. That is to say, in the technical solution of the present application, for each job to be submitted, based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, the target logical partition can be determined, and the job to be submitted can be scheduled to the target logical partition for execution, so that the number of jobs executed on each logical partition in the preset logical partition list is equal, thereby achieving balanced allocation of host resources, high resource utilization, and less prone to transaction processing timeout problems caused by insufficient resources; and the present application can automatically schedule a large number of concurrent jobs without setting a scheduling environment, without manual intervention, greatly reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A flowchart of a job scheduling method provided in one embodiment of the present application;
[0022] Figure 2 A schematic diagram of the principle of a job scheduling method provided in one embodiment of the present application;
[0023] Figure 3 A flowchart of a job scheduling method provided by another embodiment of the present application;
[0024] Figure 4 A flowchart of a job scheduling method provided in yet another embodiment of the present application;
[0025] Figure 5 A schematic diagram of the structure of a job scheduling device provided in one embodiment of the present application;
[0026] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0027] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0028] In order to facilitate a clearer understanding of the embodiments of the present application, some relevant knowledge is first introduced as follows.
[0029] First, the terms involved in the embodiments of the present application are explained.
[0030] 1. Mainframe: Small and medium-sized servers installed with host operating systems such as Multiple Virtual Storage (MVS) and OS / 390.
[0031] 2. Host logical partitioning: Host logical partitioning refers to dividing a physical server into several virtual or logical servers. Each virtual or logical server is a logical partition and has its own exclusive processor resources and other resources.
[0032] 3. Scheduling environment: A scheduling environment is associated with one or more host logical partitions. When a job is assigned to (or specified) a scheduling environment, the job will be submitted to the logical partition corresponding to the scheduling environment for execution.
[0033] 4. Job: refers to a job (JOB) written in Job Control Language (JCL). A JOB contains a job header and several job steps (STEPs). The job header can specify some operating parameters, and each STEP implements one or more functions. The job header and one or more STEPs are connected in series to form a non-empty JOB.
[0034] 5. Job Entry Subsystem (JES2): All job scheduling, input and output information in the host system are managed through JES2.
[0035] There are often a large number of jobs executing concurrently on the host. If a logical partition runs too many jobs, it is easy to fill up the resources of the logical partition, causing the online transaction running on the logical partition to time out, affecting normal transaction processing.
[0036] In related technologies, the logical partition in which the job runs is controlled by setting the scheduling environment. However, in reality, it is difficult to set a reasonable scheduling environment each time an application version is put into production, because some jobs specify the scheduling environment, while others are randomly assigned, resulting in uneven utilization of host resources; if all jobs are evaluated and the scheduling environment is specified for all jobs, the workload is huge.
[0037] Therefore, although the solution of controlling which logical partition a job runs on by setting a scheduling environment can realize resource scheduling to a certain extent, it is difficult to achieve balanced distribution, especially when the workload is huge, setting up the scheduling environment is extremely time-consuming and labor-intensive.
[0038] In summary, based on the above existing problems, the present application provides a job scheduling method, device, electronic device and storage medium, which are used to solve the scheduling problem of concurrent jobs so that host resources can be fully utilized. In addition, the present application scheme is easy to implement, has strong scalability, and can customize execution conditions as needed.
[0039] Figure 1 This is a flow chart of a job scheduling method provided by an embodiment of the present application. The method can be executed by a job scheduling device or electronic device. The device or electronic device can be implemented by software and / or hardware. The device or electronic device can be integrated in any intelligent device with network communication function. Figure 1 As shown, the job scheduling method may include the following steps:
[0040] S101. Obtain M jobs to be submitted, where M is an integer greater than or equal to 1.
[0041] In the embodiment of the present application, M jobs to be submitted need to be executed concurrently on each LAPR of the host.
[0042] S102. For each job to be submitted, if there is no preconfigured scheduling environment and / or preconfigured logical partition for the job to be submitted, determine the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one preconfigured logical partition corresponding to the job to be submitted.
[0043] In the embodiment of the present application, a job entry program needs to be written first to realize the logic judgment and processing capability of concurrent jobs of the host. In actual application, the job entry program can be written using the restructured extended execution program language (REstructured extended eXecutor, referred to as REXX).
[0044] By deploying the above-mentioned job entry program, all concurrent jobs to be submitted are scheduled to each valid logical partition in the preset logical partition list through the entry program.
[0045] The preset logical partition list includes multiple logical partitions, each of which can execute multiple jobs. The number of valid logical partitions in the preset logical partition list is variable, that is, when a job to be submitted is scheduled to any valid logical partition in the logical partition list, the number of valid logical partitions is reduced by 1.
[0046] S103: Schedule the job to be submitted to the target logical partition, so that the target logical partition executes the job to be submitted.
[0047] Figure 2A schematic diagram of the principle of the job scheduling method provided for one embodiment of the present application. Exemplarily, the logical partition list includes three logical partitions: logical partition 1, logical partition 2 and logical partition 3, and each logical partition can execute N jobs. The job to be submitted enters the job entry program, and then the entry program and the job name of the job to be submitted are used as input parameters and embedded in the entry job. The entry job executes the entry program by calling the system program (SYSTSIN). That is, the job entry program calculates the target hash value of the job to be submitted, and based on the target hash value and the number of valid logical partitions in the preset logical partition list at the current moment, determines the target logical partition that needs to execute the job to be submitted, and then schedules the job to be submitted to the target logical partition in the logical partition list, so that the target logical partition executes the job to be submitted.
[0048] An embodiment of the present application proposes a job scheduling method. For each job to be submitted, based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, the target logical partition can be determined, and the job to be submitted can be scheduled to the target logical partition for execution, so that the number of jobs executed on each logical partition in the preset logical partition list is equal, thereby achieving balanced allocation of host resources, high resource utilization, and less prone to transaction processing timeouts caused by insufficient resources; moreover, the present application can automatically schedule a large number of concurrent jobs without setting up a scheduling environment, without manual intervention, greatly reducing labor costs.
[0049] In some embodiments of the present application, after obtaining M jobs to be submitted, the following steps need to be performed:
[0050] Step 1), for any job to be submitted, obtain the job header information of the job to be submitted; the job header information is used to indicate whether the job to be submitted is configured with a preconfigured scheduling environment and / or a preconfigured logical partition.
[0051] In actual applications, the entry program obtains the job header information by reading the job name of the job to be submitted.
[0052] Step 2), based on the job header information, if it is determined that the job to be submitted is configured with a preconfigured scheduling environment and / or a preconfigured logical partition, the job to be submitted is scheduled to the preconfigured logical partition so that the preconfigured logical partition executes the job to be submitted.
[0053] In the embodiment of the present application, different processing steps are performed on the submitted job according to different information indicated by the job header information. In practical applications, the pre-configured logical partition can be indicated explicitly or implicitly through the job header information:
[0054] Display indication method: If the job header information indicates that the job to be submitted is configured with a pre-configured logical partition, the job to be submitted is directly scheduled to be executed on the pre-configured logical partition.
[0055] Implicit indication method: If the job header information indicates that the job to be submitted is configured with a preconfigured scheduling environment, the job to be submitted is scheduled to be executed on the preconfigured logical partition associated with the preconfigured scheduling environment.
[0056] In the above implementation, the logical partition that needs to execute the job to be submitted can be directly determined through the job header information, thereby improving the scheduling efficiency of the job to be submitted.
[0057] In some embodiments of the present application, after scheduling the job to be submitted to the preconfigured logical partition, the following steps need to be performed:
[0058] The state of the preconfigured logical partition is set to invalid until the preconfigured logical partition completes the job to be submitted, and then the state of the preconfigured logical partition is reset to valid.
[0059] In an embodiment of the present application, the preset logical partition list includes multiple preconfigured logical partitions, and the initial status of each preset logical partition is valid. After scheduling the job to be submitted to a preconfigured logical partition, the status of the preconfigured logical partition is set to invalid. Through the above method, the new job to be submitted is prevented from being scheduled to the preconfigured logical partition that is executing the job, so that the number of jobs executed on each preconfigured LPRA is equal, and the host resources are evenly distributed.
[0060] In actual applications, there are many ways to set the status of a pre-configured logical partition to invalid. For example, the pre-configured logical partition is deleted from the preset logical partition list and recorded as invalid. For another example, a status value is set for the preset logical partition, such as a status value of "0" indicates invalid, and a status value of "1" indicates valid.
[0061] In some embodiments of the present application, when it is determined based on the job header information that the job to be submitted does not have a preconfigured scheduling environment and / or preconfigured logical partition, it is necessary to determine the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment. This is specifically achieved by the following steps:
[0062] Step 1), performing a modulus operation based on the target hash value and the number of valid logical partitions to obtain a remainder; the remainder has a mapping relationship with the target logical partition;
[0063] Step 2) Determine the target logical partition based on the remainder and the mapping relationship.
[0064] In the embodiment of the present application, if the job to be submitted does not have a preconfigured scheduling environment and / or preconfigured logical partition, it means that the job to be submitted is running randomly. At this time, it is necessary to calculate the target hash value for the job to be submitted and take the modulus of the target hash value with the number of valid logical partitions in the preset logical partition list, and map the remainder after taking the modulus to the corresponding target logical partition to execute the host job.
[0065] The following is a detailed introduction to the different scheduling scenarios corresponding to different job header information of the submitted jobs:
[0066] Scenario 1: Assume that the job header information of the job to be submitted has pre-configured logical partition 2, then the entry program in the entry job schedules the job to be submitted to be executed on logical partition 2. After the scheduling is successful, logical partition 2 is deleted from the preset logical partition list (or its status is set to invalid).
[0067] Scenario 2: Assume that the job header information of the job to be submitted does not have a preconfigured scheduling environment or preconfigured logical partitions. Then use the entry program in the entry job to calculate the target hash value of the job to be submitted, and then read the number of valid logical partitions in the preset logical partition list (for example, the status values of each logical partition in the preset logical partition list are as follows: logical partition 1, "1"; logical partition 2, "0"; logical partition 3, "1"), that is, logical partition 1 and logical partition 3 are 2 valid. After taking the target hash value modulo 2, a remainder of 0 or 1 is obtained. If the remainder is 0, based on the mapping relationship corresponding to the remainder "0", the job to be submitted is scheduled to logical partition 1 for execution; if the remainder is 1, based on the mapping relationship corresponding to the remainder "1", the job to be submitted is scheduled to logical partition 3 for execution.
[0068] Through the above implementation, the entry program modulos the target hash value with the number of valid logical partitions in the preset logical partition list at the current moment to obtain a remainder. The job to be submitted is scheduled to be executed on the target logical partition corresponding to the remainder, so that the number of jobs running on each logical partition in the preset logical partition list is equal, thereby achieving the purpose of fully utilizing the host resources.
[0069] In some embodiments of the present application, before determining the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, it is necessary to calculate the target hash value; this is specifically achieved by the following steps:
[0070] Step 1) Obtain the job name and submission time of the job to be submitted;
[0071] Step 2), convert the job name and submission time into an initial hash value;
[0072] Step 3) Convert the initial hash value into a pure digital target hash value.
[0073] In the above implementation, the entry program obtains an initial hash value by calculating the job name and submission time, and converts the initial hash value into a pure digital target hash value. It is easier to perform a modulus operation on the pure digital target hash value to obtain a remainder, thereby improving the calculation efficiency and thus improving the job scheduling efficiency.
[0074] In some embodiments of the present application, after scheduling the job to be submitted to the target logical partition, the following steps need to be performed:
[0075] The state of the target logical partition is set to invalid until the target logical partition completes the execution of the pending job, and then the state of the target logical partition is reset to valid.
[0076] In an embodiment of the present application, the preset logical partition list includes multiple logical partitions, and the initial status of each logical partition is valid. After scheduling the job to be submitted to a certain logical partition, the logical partition is used as the target logical partition and the status is set to invalid. Through the above method, the new job to be submitted is prevented from being scheduled to the target logical partition that is executing the job, so that the number of jobs executed on each LPRA in each preset logical partition list is equal, and the host resources are evenly distributed.
[0077] After the target logical partition completes executing the job to be submitted, the state of the target logical partition is set to be valid, so that the target logical partition can re-process the newly scheduled job.
[0078] Figure 3 A flowchart of a job scheduling method provided in another embodiment of the present application specifically includes the following steps:
[0079] S301. Obtain M jobs to be submitted, where M is an integer greater than or equal to 1.
[0080] S302: For any job to be submitted, obtain job header information of the job to be submitted; the job header information is used to indicate whether the job to be submitted is configured with a preconfigured scheduling environment and / or a preconfigured logical partition.
[0081] If the job header information indicates that a preconfigured scheduling environment and / or preconfigured logical partition is configured, execute S303-S304; if the job header information indicates that no preconfigured scheduling environment and / or preconfigured logical partition is configured, execute S305-S309.
[0082] S303: Schedule the job to be submitted to the pre-configured logical partition, so that the pre-configured logical partition executes the job to be submitted.
[0083] S304: Set the status of the pre-configured logical partition to invalid until the pre-configured logical partition completes the job to be submitted, and then reset the status of the pre-configured logical partition to valid.
[0084] S305 , obtaining the job name and submission time of the job to be submitted, converting the job name and submission time into an initial hash value, and converting the initial hash value into a purely digital target hash value.
[0085] S306: Perform a modulo operation based on the target hash value and the number of valid logical partitions in the preset logical partition list at the current moment to obtain a remainder; the remainder has a mapping relationship with the target logical partition.
[0086] S307: Determine the target logical partition based on the remainder and the mapping relationship.
[0087] S308: Schedule the job to be submitted to the target logical partition, so that the target logical partition executes the job to be submitted.
[0088] S309: Set the state of the target logical partition to invalid until the target logical partition completes the job to be submitted, and then reset the state of the target logical partition to valid.
[0089] Figure 4 A flowchart of a job scheduling method provided in another embodiment of the present application specifically includes the following steps:
[0090] S401, initialize the logical partition list to all the logical partitions in use.
[0091] In this step, all logical partitions in use means that all logical partitions in the logical partition list are in valid state.
[0092] S402: Obtain jobs to be submitted.
[0093] S403: The entry job obtains the job header information of the job to be submitted.
[0094] S404: Determine whether there is a specified scheduling environment or logical partition in the job header information.
[0095] In this step, a scheduling environment or a logical partition is specified, namely, the pre-configured scheduling environment and the pre-configured logical partition mentioned above.
[0096] When the job header information specifies a scheduling environment or a logical partition, steps S405-S406 are executed; when the job header information does not specify a scheduling environment or a logical partition (ie, random), steps S407-S409 are executed.
[0097] S405: Schedule the job to be submitted to run on the specified logical partition.
[0098] S406: Remove the logical partition name from the logical partition list, and return to execute S402.
[0099] S407: Calculate the hash value of the job to be submitted.
[0100] In this step, the hash value of the job to be submitted refers to the target hash value mentioned above.
[0101] S408. Take the modulus of the hash value by the number of logical partitions in the logical partition list and obtain the remainder.
[0102] S409: Schedule the job to be submitted to run on the logical partition corresponding to the remainder, and return to execute S401.
[0103] Figure 5 This is a schematic diagram of the structure of a job scheduling device provided in one embodiment of the present application. Figure 5 As shown, the job scheduling device includes:
[0104] A first acquisition module 501 is used to acquire M jobs to be submitted, where M is an integer greater than or equal to 1;
[0105] The determination module 502 is used to determine, for each job to be submitted, a target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, when the job to be submitted does not have a preconfigured scheduling environment and / or a preconfigured logical partition; the preconfigured scheduling environment is used to indicate at least one preconfigured logical partition corresponding to the job to be submitted;
[0106] The first scheduling module 503 is used to schedule the job to be submitted to the target logical partition, so that the target logical partition executes the job to be submitted.
[0107] An embodiment of the present application proposes a job scheduling device. For each job to be submitted, based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, the target logical partition can be determined, and the job to be submitted can be scheduled to the target logical partition for execution, so that the number of jobs executed on each logical partition in the preset logical partition list is equal, thereby achieving balanced allocation of host resources, high resource utilization, and less prone to transaction processing timeouts caused by insufficient resources; moreover, the present application can automatically schedule a large number of concurrent jobs without setting up a scheduling environment, without manual intervention, greatly reducing labor costs.
[0108] The above-mentioned job scheduling device can execute the method provided by any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the job scheduling method provided by any embodiment of the present application.
[0109] An embodiment of the present invention also provides a computer program product.
[0110] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer program products, which can include one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0111] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 6 , Figure 6 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 6 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0112] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0113] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0114] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0115] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in the memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 46 generally perform the functions and / or methods of the embodiments described herein.
[0116] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0117] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a job scheduling method provided in an embodiment of the present invention: obtaining M jobs to be submitted, where M is an integer greater than or equal to 1; for each job to be submitted, if the job to be submitted does not have a preconfigured scheduling environment and / or a preconfigured logical partition, determining the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one of the preconfigured logical partitions corresponding to the job to be submitted; scheduling the job to be submitted to the target logical partition so that the target logical partition executes the job to be submitted.
[0118] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a job scheduling method as provided in all the embodiments of the present invention is implemented: obtaining M jobs to be submitted, where M is an integer greater than or equal to 1; for each job to be submitted, in the case where the job to be submitted does not have a preconfigured scheduling environment and / or a preconfigured logical partition, determining the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one of the preconfigured logical partitions corresponding to the job to be submitted; scheduling the job to be submitted to the target logical partition so that the target logical partition executes the job to be submitted. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0119] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0120] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0121] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0122] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A job scheduling method, characterized in that: The method comprises: Get M jobs to be submitted, where M is an integer greater than or equal to 1; For each job to be submitted, if the job to be submitted does not have a preconfigured scheduling environment and / or a preconfigured logical partition, determine the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one of the preconfigured logical partitions corresponding to the job to be submitted; The job to be submitted is scheduled to the target logical partition, so that the target logical partition executes the job to be submitted.
2. The method according to claim 1, characterized in that The step of determining the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment comprises: Perform a modulo operation based on the target hash value and the number of valid logical partitions to obtain a remainder; the remainder has a mapping relationship with the target logical partition; The target logical partition is determined based on the remainder and the mapping relationship.
3. The method according to claim 1 or 2, characterized in that: Before determining the target logical partition corresponding to the job to be submitted in the preset logical partition list based on the target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment, the method further includes: Obtain the job name and submission time of the job to be submitted; Convert the job name and submission time into an initial hash value; The initial hash value is converted into the target hash value which is a pure number.
4. The method according to claim 1 or 2, characterized in that: After scheduling the to-be-submitted job to the target logical partition, the method further includes: The state of the target logical partition is set to invalid until the target logical partition completes executing the job to be submitted, and the state of the target logical partition is reset to valid.
5. The method according to claim 1 or 2, characterized in that: After obtaining the M jobs to be submitted, the method further includes: For any job to be submitted, obtaining job header information of the job to be submitted; the job header information is used to indicate whether the job to be submitted is configured with the preconfigured scheduling environment and / or the preconfigured logical partition; If it is determined based on the job header information that the job to be submitted is configured with the preconfigured scheduling environment and / or the preconfigured logical partition, the job to be submitted is scheduled to the preconfigured logical partition so that the preconfigured logical partition executes the job to be submitted.
6. The method according to claim 5, characterized in that After scheduling the to-be-submitted job to the preconfigured logical partition, the method further includes: The state of the pre-configured logical partition is set to invalid until the pre-configured logical partition completes the job to be submitted, and the state of the pre-configured logical partition is reset to valid.
7. A job scheduling device, characterized in that: The device comprises: A first acquisition module is used to acquire M jobs to be submitted, where M is an integer greater than or equal to 1; A determination module, for each job to be submitted, when the job to be submitted does not have a preconfigured scheduling environment and / or a preconfigured logical partition, determining a target logical partition corresponding to the job to be submitted in the preset logical partition list based on a target hash value of the job to be submitted and the number of valid logical partitions in the preset logical partition list at the current moment; the preconfigured scheduling environment is used to indicate at least one of the preconfigured logical partitions corresponding to the job to be submitted; The first scheduling module is used to schedule the job to be submitted to the target logical partition, so that the target logical partition executes the job to be submitted.
8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the job scheduling method according to any one of claims 1 to 6.
9. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the job scheduling method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the job scheduling method according to any one of claims 1 to 6.