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

Method and system for realizing daemon process based on Linux timing task

A daemon process and timing task technology, applied in the field of daemon process and timing task services, can solve the problems of waste of system resources, occupation of system resources, and unguaranteed life cycle of daemon processes, etc., to achieve the effect of ensuring real-time performance and powerful computing power

Active Publication Date: 2012-01-25
BEIJING ANTIY NETWORK SAFETY TECH CO LTD
View PDF3 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] 1. The daemon process has been running in the background of the system. Even if there are no tasks, it will always exist and occupy system resources. Although a single daemon process occupies less system resources when idle, when there are multiple daemon processes on a machine, This is a huge waste of system resources
[0011] 2. Failure to release resources occupied by other services in time
The daemon process is generally associated with other services, such as database services. After the daemon process finishes processing tasks, it needs to store data in the database. Therefore, the daemon process will open some database connections (database connection pool) at the beginning of startup, so that the daemon process This database connection resource will be occupied throughout the entire running life cycle, even if there are no tasks, and resources such as database connection pools are limited, and the daemon process cannot release these resources when idle, causing other services to be unable to obtain them. resource
[0012] 3. The life cycle of the daemon process cannot be guaranteed
After the daemon process dies, the tasks in the task queue will not be processed in time

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
  • Method and system for realizing daemon process based on Linux timing task
  • Method and system for realizing daemon process based on Linux timing task
  • Method and system for realizing daemon process based on Linux timing task

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, and to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the present invention will be further detailed below in conjunction with the accompanying drawings illustrate.

[0038] The daemon process described in the present invention is not a traditional long-running process in the background of the system, but utilizes Linux timing tasks to periodically enable new processes to process tasks in the task queue. Process such as figure 1 Shown:

[0039] S101, configure the information of the daemon process in the configuration file of the Linux timing task;

[0040] The information for configuring the daemon process in the configuration file of the Linux scheduled task includes the daemon process startup period and the daemon process startup comm...

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 method for realizing a daemon process based on a Linux timing task. The method comprises the following steps: configuring information of the daemon process in a configuration file of the Linux timing task; starting the daemon process by the Linux timing task according to the information of the configuration file; reading the information of the configuration file and judging if the number of the started daemon process reaches the maximum starting number set by the configuration file; checking the state of a task queue, and if the length of the task queue is more than 0, circularly and continuously reading and processing task data from the task queue by the daemon process. The daemon process provided by the invention dose not reside in the system permanently, dose not occupy system resources all the time and is started by a timing task, and enough processes can be started reasonably according to a task volume to process a to-be-processed task.

Description

technical field [0001] The invention relates to the field of computer operating systems, in particular to a method for realizing a more flexible, reliable and system resource-saving daemon process in a disguised form based on the timing task service provided by the operating system in Linux. Background technique [0002] The daemon process is the Daemon process mentioned by Tongtong, which is a background service process in Linux. It is a long-lived process, usually independent of the controlling terminal, that periodically performs some task or waits for some event to occur. Daemons are often started when the system is booted and terminated when the system is shut down. [0003] Using daemons has the following advantages: [0004] 1. The life cycle is long, you can always process or wait for a certain task, process it if there is a task, and temporarily sleep if there is no task; [0005] 2. A single process can work without other sub-processes. [0006] Because the dae...

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/46
Inventor 王亮孙晋超杨祖明
Owner BEIJING ANTIY NETWORK SAFETY 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