Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Serialized multi-process task scheduling method and device

A technology of task scheduling and multi-process, which is applied in the direction of multi-program device, program control design, program startup/switching, etc. It can solve problems such as deadlock and high complexity of task scheduling, and achieve the effect of simplifying the complexity

Active Publication Date: 2018-06-29
BEIJING ANBOTONG TECH CO LTD
View PDF10 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] This application provides a serialized multi-process task scheduling method and device to solve the technical problem of high task scheduling complexity and easy deadlock when the management process handles multi-process tasks

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Serialized multi-process task scheduling method and device
  • Serialized multi-process task scheduling method and device
  • Serialized multi-process task scheduling method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0056] see image 3 , a flowchart of a serialized multi-process task scheduling method provided by an embodiment of the present application, the method includes:

[0057] S100. Register a specific event and a specific event processing function corresponding to the specific event to a specific event list;

[0058] In some embodiments, the working process may have to complete a large number of operational tasks, but special events may occur during the running process of the working process.

[0059] For example, in the case of using brute force to crack server passwords, the management process continuously generates the next username and password to try and distributes the username and password to the worker process, which uses the username and password to log in to the server. During this process, it may happen that all usernames and passwords have been tried, and what needs to be done at this time is to clean up the environment; there may also be a situation where the working...

Embodiment 2

[0074] join Figure 4 , a flow chart of another serialized multi-process task scheduling method provided by the embodiment of the present application.

[0075] Described in the list of specific events and the list of io events, find the event to be executed, and add the event to be executed to the queue to be executed. The steps include:

[0076] S501. Determine whether there is a specific event in the specific event list that satisfies the establishment condition of the specific event;

[0077] If there is a specific event that satisfies the establishment condition of the specific event, then the specific event and the specific event processing function are added to the queue to be executed as the event to be executed;

[0078] The specific event establishment condition is the criterion that the specific event can be added to the to-be-executed queue. Referring to the example of step S100, the specific event establishment condition is the received signal and the specific event...

Embodiment 3

[0083] Described in the specific event list and the io event list, look for the event to be executed, and the step of adding the event to be executed to the queue to be executed also includes:

[0084] If there is no specific event that satisfies the establishment condition of the specific event, and there is no io event that satisfies the establishment condition of the io event, it is judged whether the queue to be executed is empty;

[0085] When the queue to be executed is empty, the ipc file descriptor interacting with the subprocess is detected, and the ipc file descriptor, the io event processing function and the io event callback function are added to the to-be-executed queue.

[0086] When the to-be-executed queue is not empty, the to-be-executed event is read from the to-be-executed queue and returned.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a serialized multi-process task scheduling method and device. The method includes the steps: S100 registering a specific event and a specific event processing function corresponding to the specific event to a specific event list; S200 starting a plurality of work progresses managed by a single thread; S300 recording an ipc file descriptor communicated with sub-processes ofthe work progresses; S400 registering an io event, an io event processing function and an io event callback function corresponding to the io event to an io event list; S500 searching an event to be executed in the specific event list and the io event list, adding the event to be executed into a queue to be executed, and reading one event to be executed; S600 executing the event to be executed readout in the step S500, and returning the step S500. The io event is provided with the ipc file descriptor. According to the method, a plurality of work processes are managed by the aid of the single thread, task scheduling complexity is simplified, and deadlock risks are omitted.

Description

technical field [0001] The present application relates to the technical field of multi-process task scheduling, and in particular, to a serialized multi-process task scheduling method and device. Background technique [0002] A process is a running program entity and includes all system resources occupied by this running program, such as CPU (registers), IO, memory, network resources, etc. A process is often defined as the execution of a program. A process can be regarded as an independent program with complete data space and code space in memory. A process owns data and variables that belong only to itself. A process is a running activity of a program with certain independent functions on a certain data set, and is an independent unit for the system to allocate and schedule resources. Management process is one of the functions of the operating system, mainly to manage the processor. In order to improve the utilization of CPU, multi-programming technology is adopted. Coo...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48
CPCG06F9/4881
Inventor 曾祥禄
Owner BEIJING ANBOTONG TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products