CN113742042A - Timer processing method, device and equipment and readable storage medium - Google Patents

Timer processing method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN113742042A
CN113742042A CN202110987948.0A CN202110987948A CN113742042A CN 113742042 A CN113742042 A CN 113742042A CN 202110987948 A CN202110987948 A CN 202110987948A CN 113742042 A CN113742042 A CN 113742042A
Authority
CN
China
Prior art keywords
timer
time
queue
queues
resolution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110987948.0A
Other languages
Chinese (zh)
Other versions
CN113742042B (en
Inventor
吴庆凯
孙明刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110987948.0A priority Critical patent/CN113742042B/en
Publication of CN113742042A publication Critical patent/CN113742042A/en
Application granted granted Critical
Publication of CN113742042B publication Critical patent/CN113742042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a timer processing method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring an environment variable set according to the requirement of a system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of a CPU (Central processing Unit); selecting a timer corresponding to each timing task from the timers at each resolution level, and setting the trigger time of the timer corresponding to each timing task according to each timing task; and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time. According to the technical scheme, the resolution levels of the timers are set according to the set environment variables, and the timers with the resolution levels capable of meeting the requirements of the timing tasks are selected from the timers with the resolution levels, so that the timers with the set triggering time can better meet the requirements of the timing tasks in the system.

Description

Timer processing method, device and equipment and readable storage medium
Technical Field
The present application relates to the field of storage system technologies, and in particular, to a timer processing method, apparatus, device, and readable storage medium.
Background
In a storage system, a data I/O (Input/Output) undergoes multiple operation stages such as a storage volume, a storage pool, a raid (Redundant Arrays of Independent Disks), a storage disk, and the like in a backend process, and each stage of I/O circulation needs to have a strict requirement on time and needs timers with different resolutions to record response time.
At present, generally, a timer with preset uniform resolution is directly applied to a system, however, the problem that the resolution of the timer cannot just meet the requirement of a timing task exists in the method, for example: the timing task is frequently executed due to the fact that the resolution of the timer is too small, so that resources are wasted, or the timing task cannot be executed better due to the fact that the resolution of the timer is too large.
In summary, how to enable the timer to better satisfy the system requirement is a technical problem to be urgently solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a timer processing method, apparatus, device and readable storage medium, which enable a timer to better meet system requirements.
In order to achieve the above purpose, the present application provides the following technical solutions:
a timer processing method, comprising:
acquiring an environment variable set according to the requirement of a system on the resolution of a timer, and setting the resolution level of the timer according to the environment variable and the frequency of a CPU (Central processing Unit);
selecting a timer corresponding to each timing task from the timers of each resolution level, and setting the trigger time of the corresponding timer according to each timing task;
and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time.
Preferably, after the trigger time of the timer corresponding to each timing task is set, the method further includes:
establishing a timer queue and a thread corresponding to each resolution level;
and adding the timers of the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by utilizing the threads.
Preferably, after creating the thread corresponding to each resolution level, the method further includes:
and if the number of the cores of the CPU is larger than the number of the threads, binding each thread with different cores of the CPU.
Preferably, creating a timer queue corresponding to each resolution level includes:
respectively creating a plurality of timer queues corresponding to each resolution level;
correspondingly determining the reference time of a first timer queue in a plurality of timer queues corresponding to each resolution level according to the running time length from the starting of the system to the completion time of queue creation and the environment variable corresponding to each resolution level;
correspondingly determining reference time intervals between two adjacent timer queues in a plurality of timer queues corresponding to each resolution level according to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the plurality of corresponding timer queues according to the reference time intervals;
adding the timers with the corresponding resolutions into the corresponding timer queues by using the threads according to the sequence of the trigger time from front to back, wherein the sequence comprises the following steps:
and adding the timers of the resolution levels into the corresponding timer queues by utilizing the corresponding threads according to the sequence of the triggering time from front to back according to the triggering time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels.
Preferably, the method further comprises the following steps:
if a temporary unsatisfied timer with trigger time not in the time range managed by the corresponding timer queues exists, storing the temporary unsatisfied timer in a temporary linked list of the timer according to the sequence of the trigger time from front to back;
judging whether a target timer with trigger time within the time range managed by the corresponding timer queues exists in the timer temporary storage linked list or not;
and if so, adding the target timer into the corresponding timer queue according to the trigger time of the target timer and the reference time of the corresponding timer queues.
Preferably, the method further comprises the following steps:
correspondingly taking a first timer queue in a plurality of timer queues corresponding to each resolution level as a current processing queue of each resolution level;
determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable, wherein the determining comprises the following steps:
comparing the ratio of the current running time of the system from the starting to the current time with the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is smaller than the corresponding reference time interval, determining a timer with the trigger time smaller than the ratio in the current processing queue as a timer reaching the trigger time;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, updating the reference time of the current processing queue according to the number of timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval, and a next timer queue of the plurality of timer queues corresponding to the resolution level corresponding to the environment variable is used as the current processing queue, and returning to execute the step of comparing the current running time of the system from the starting to the current time with the ratio of the environmental variable and the reference time of the current processing queue of the resolution level corresponding to the environmental variable until a timer with the trigger time larger than the ratio exists in the current processing queue.
A timer processing apparatus comprising:
the setting module is used for acquiring an environment variable set according to the requirement of a system on the resolution of the timer and setting the resolution level of the timer according to the environment variable and the frequency of the CPU;
the selection module is used for selecting the timer corresponding to each timing task from the timers at each resolution level and setting the trigger time of the timer corresponding to each timing task according to each timing task;
and the execution module is used for determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the trigger time.
Preferably, the method further comprises the following steps:
the creating module is used for creating a timer queue and a thread corresponding to each resolution level after the triggering time of the timer corresponding to each timing task is set;
and the adding module is used for adding the timers of the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by utilizing the threads.
A timer processing apparatus comprising:
a memory for storing a computer program;
a processor for implementing the steps of the timer processing method according to any one of the above when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the timer processing method according to any one of the preceding claims.
The application provides a timer processing method, a timer processing device and a readable storage medium, wherein the method comprises the following steps: acquiring an environment variable set according to the requirement of a system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of a CPU (Central processing Unit); selecting a timer corresponding to each timing task from the timers at each resolution level, and setting the trigger time of the timer corresponding to each timing task according to each timing task; and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time.
According to the technical scheme disclosed by the application, the environment variable which is set in advance according to the requirement of the system on the resolution ratio of the timer is obtained, the resolution ratio level of the timer is set according to the obtained environment variable and the frequency of a CPU (Central processing Unit), so that the flexible change and setting of the resolution ratio of the timer are realized, the flexibility of setting the resolution ratio of the timer is improved, after the resolution ratio level of the timer is set according to the environment variable, the timer with the resolution ratio level capable of meeting the requirement of the timing task is selected from the timers with various resolution ratio levels, so as to determine the timer corresponding to each timing task, the trigger time of the timer corresponding to the timing task is set according to the requirement of the timing task, so that the timer with the set trigger time can better meet the requirement of the timing task, namely the timer can better meet the requirement of the system on the timer, therefore, the timing tasks can be accurately executed based on the corresponding timers, and the execution performance of each timing task in the system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a timer processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a plurality of timer queues corresponding to a resolution level of a microsecond level according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a temporary linked list of a timer provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of a timer processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a timer processing device according to an embodiment of the present application.
Detailed Description
In the storage field, a data I/O undergoes multiple operation stages such as storage volume, storage pool, raid, storage disk, etc. during the back-end processing, each stage of I/O circulation has strict requirements on time control, and a large number of timers with different resolutions are required to record the response time of each module. Wherein, the resolution of the timer refers to the timing precision of the timer. At present, a fixed and uniform-resolution timer is generally applied to a system, but the fixed and uniform-resolution timer may not meet the requirement of a timing task exactly, for example: if the timing requirement of the timing task is millisecond level and the resolution of the applied timer is microsecond level, the timing task is frequently executed, so that the resource waste is caused, and the pressure of a CPU is high; if the timing requirement of the timing task is in the nanosecond level and the resolution of the applied timer is in the μ s level, this may result in that the timing task cannot be executed better, that is, the existing timer with fixed and uniform resolution cannot meet the requirement of the system better.
Therefore, the application provides a timer processing method, a timer processing device, a timer processing apparatus and a readable storage medium, which are used for enabling a timer to better meet system requirements.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, which shows a flowchart of a timer processing method provided in an embodiment of the present application, a timer processing method provided in an embodiment of the present application may include:
s11: and acquiring an environment variable set according to the requirement of the system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of the CPU.
Firstly, the environment variable RF _ TICK may be set in advance according to the requirement of the system for the resolution of the timer, wherein the requirement of the system for the resolution of the timer may specifically be the requirement of each timing task in a storage software station (i.e. each operation phase of I/O circulation) in the storage system for the resolution of the timer.
Then, a preset environment variable RF _ TICK is obtained, and the resolution level of the timer is set according to the environment variable RF _ TICK and the frequency of the CPU, wherein each environment variable corresponds to the timer with one resolution level, and specifically, the resolution level of the timer is equal to the frequency of the RF _ TICK/CPU. The timer in this application takes reference TICKs (reference heartbeats) as reference heartbeats (time granularity), each of which is limited by the CPU frequency, while the period of the reference heartbeats is specified by setting an environment variable RF _ TICK, for example: for a CPU with a frequency of 2GHz, the number of vibrations per microsecond is 2000, if the environment variable RF _ TICK is set to 2, the resolution level of the timer is 1 nanosecond, and if the environment variable RF _ TICK is set to 2000, the resolution level of the timer is 1 microsecond.
Therefore, the resolution of the timer can be flexibly changed by setting the environment variable RF _ TICK.
S12: and selecting the timer corresponding to each timing task from the timers of each resolution level, and setting the trigger time of the corresponding timer according to each timing task.
After the resolution levels of the timers are set according to the environment variables, the timers with the resolution levels meeting the requirements of the timing tasks are selected from the obtained timers with the resolution levels according to the requirements of the timing tasks in the system, so that the timers corresponding to the timing tasks are determined, and the determined timers with the resolution levels corresponding to the timing tasks can better meet the requirements of the timing tasks.
After the timer corresponding to the timing task is determined, the trigger time of the timer corresponding to the timing task can be set according to the requirement of the timing task, that is, the trigger time of the timer corresponding to the timing task and having a resolution level capable of meeting the requirement can be set according to the requirement of the timing task on the execution time, so that the timer with the set trigger time can better meet the requirement of the timing task.
S13: and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time.
Based on steps S11 and S12, the current time of the system may be obtained, and it may be determined whether the current time of the system reaches the trigger time of the timer at the resolution level corresponding to the environment variable in combination with the environment variable RF _ TICK, for example, for the environment variable RF _ TICK ═ 2000, which corresponds to the timer at the resolution level of microseconds, it may be determined whether the timer at the resolution level of microseconds is present in the timers at the resolution level according to RF _ TICK ═ 2000 and the current time of the system, and if it is determined that the timer at the resolution level of microseconds is present, the timing task corresponding to the timer at the trigger time is executed.
According to the process, the soft timer mechanism is realized, and in the soft timer mechanism, not only can the resolution level of the timer be flexibly set, but also the timer with the set resolution level can better meet the requirement of the timing task, so that the timing task can be better executed.
According to the technical scheme disclosed by the application, the environment variable which is set in advance according to the requirement of the system on the resolution ratio of the timer is obtained, the resolution ratio level of the timer is set according to the obtained environment variable and the frequency of a CPU (Central processing Unit), so that the flexible change and setting of the resolution ratio of the timer are realized, the flexibility of setting the resolution ratio of the timer is improved, after the resolution ratio level of the timer is set according to the environment variable, the timer with the resolution ratio level capable of meeting the requirement of the timing task is selected from the timers with various resolution ratio levels, so as to determine the timer corresponding to each timing task, the trigger time of the timer corresponding to the timing task is set according to the requirement of the timing task, so that the timer with the set trigger time can better meet the requirement of the timing task, namely the timer can better meet the requirement of the system on the timer, therefore, the timing tasks can be accurately executed based on the corresponding timers, and the execution performance of each timing task in the system is improved.
After the triggering time of the timer corresponding to each timing task is set according to each timing task, the timer processing method provided by the embodiment of the application may further include:
establishing a timer queue and a thread corresponding to each resolution level;
and adding the timers of the corresponding resolution levels into the corresponding timer queues by utilizing the threads according to the sequence of the trigger time from front to back.
In this application, after the trigger time of the timer corresponding to each timing task is set according to each timing task, a timer queue and a thread corresponding to each resolution level may be created, that is, each resolution level corresponds to its own timer queue and thread, respectively, where the timer queue may distinguish timers of different resolution levels, and the thread corresponding to the resolution level may manage the corresponding timer (the management includes, but is not limited to, adding the corresponding timer into the timer queue, and determining whether the trigger time of the corresponding timer is reached), for example: the thread corresponding to the microsecond level can realize the management of the timer of the microsecond level.
After the timer queues and the threads are created, the threads may be used to add the timers of the resolution levels corresponding to the threads into the corresponding timer queues according to the sequence of the trigger time from the front to the back, for example, the threads corresponding to the resolution levels of the microseconds add the timers of the resolution levels of the microseconds into the timer queues corresponding to the resolution levels of the microseconds according to the sequence of the trigger time from the front to the back, and the timers of other resolution levels are processed in a similar manner, so that the timers of different resolution levels are added into the corresponding timer queues, thereby distinguishing the timers of different resolution levels and facilitating the efficient management of the timers of different resolution levels.
After creating the threads corresponding to the resolution levels, the timer processing method provided in the embodiment of the present application may further include:
and if the number of the cores of the CPU is larger than the number of the threads, binding each thread with different cores of the CPU.
In the application, after creating the threads corresponding to the resolution levels, if the number of cores of the CPU is greater than the number of threads, the created threads may be bound to different cores of the CPU, that is, each thread may be bound to one CPU core (the CPU core bound to each thread is different), so that the created threads may monopolize one CPU core to use and manage the timer queue, so as to improve the efficiency and convenience of management.
It should be noted that, if the number of cores of the CPU is not greater than the number of created cores of the CPU, the binding between the thread and the core of the CPU may not be performed any more, so as to avoid affecting other services of the CPU.
The timer processing method provided in the embodiment of the present application, which creates a timer queue corresponding to each resolution level, may include:
respectively creating a plurality of timer queues corresponding to each resolution level;
correspondingly determining the reference time of a first timer queue in a plurality of timer queues corresponding to each resolution level according to the running time length from the starting of the system to the completion time of queue creation and the environment variable corresponding to each resolution level;
correspondingly determining a reference time interval between two adjacent timer queues in a plurality of timer queues corresponding to each resolution level according to the frequency of a CPU, a thread scheduling period and an environment variable corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the plurality of corresponding timer queues according to the reference time interval;
adding the timers with the corresponding resolutions to the corresponding timer queues according to the sequence of the trigger time from front to back by using the threads, wherein the adding comprises the following steps:
and adding the timers of the resolution levels into the corresponding timer queues by using the corresponding threads according to the sequence of the triggering time from front to back according to the triggering time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels.
In this application, when creating a timer queue corresponding to each resolution level, a plurality of timer queues corresponding to each resolution level may be created, that is, each resolution level may correspond to a plurality of timer queues, for example, as shown in fig. 2, which shows a schematic diagram of a plurality of timer queues corresponding to a resolution level of microseconds provided in this embodiment of the present application, it should be noted that fig. 2 illustrates an example of 50 timer queues, but it is not limited to include only 50 timer queues, and as shown in fig. 2, each timer queue corresponds to a queue parameter, where the queue parameter specifically includes a node linked list pointer (Ss _ list _ node), a reference time, and a spin lock (spin _ lock).
After the plurality of timer queues corresponding to the resolution level are created, a running Time period from the start of the system to a queue creation completion Time (the queue creation completion Time mentioned here is a Time corresponding to the system when the timer queues are created) may be acquired from the system by using a TSC (Time Stamp Counter) which is acquired as a running Time period of nanosecond or better. After the running time length from the start of the system to the time of completing the queue creation is obtained, the running time length/environment variable value may be used as the reference time of the first timer queue in the multiple timer queues corresponding to each resolution level according to the obtained running time length and the environment variable corresponding to each resolution level, for example: for the resolution level of the microsecond level, a value obtained by setting the running time length/RF _ TICK ═ 2000 of the system may be used as the reference time (reference _ time) of the first timer queue in the plurality of timer queues corresponding to the microsecond level.
Then, the reference time interval between two adjacent timer queues in the plurality of timer queues corresponding to each resolution level may be determined by using ((the frequency of the CPU/the RF _ TICK)/the number of thread scheduling cycles included in one second)/the number of timer queues corresponding to the resolution level, based on the frequency of the CPU, the thread scheduling cycle (generally 10ms), and the environment variable RF _ TICK corresponding to each resolution level, for example: for a CPU frequency of 2GHz, an environment variable RF _ TICK of 2000 (the corresponding resolution level is in the order of microseconds), a thread scheduling cycle of 10ms, and 50 timer queues corresponding to the order of microseconds, the number of timer queues corresponding to ((frequency of CPU/RF _ TICK)/(number of thread scheduling cycles included in one second))/resolution level ═ the number of timer queues corresponding to ((2 × 10) ·92000)/100)/50-200 microseconds.
After the reference time interval between two adjacent timer queues in the multiple timer queues corresponding to each resolution level is determined, the reference time interval of the corresponding multiple may be sequentially added to the reference time of the first timer queue corresponding to each resolution level, so as to correspondingly determine the reference times of the remaining timer queues except the first timer queue in the multiple timer queues corresponding to each resolution level. For example, for the microsecond level, after determining the reference time and the reference time interval of the first timer queue, 200 may be added to the reference time of the first timer queue to obtain the reference time of the second timer queue, and 200 × 2 may be added to the reference time of the first timer queue to obtain the reference time … … of the third timer queue until the reference time of the last timer queue is determined.
On the basis, the thread adds the timer with the corresponding resolution into the corresponding timer queue according to the sequence of the trigger time from front to back, specifically, the trigger time of the timer with each resolution level and the reference time of each timer queue corresponding to each resolution level are used, the timer queue to which the timer with each resolution level belongs in the corresponding plurality of timer queues is determined by using the corresponding thread, and the timer queue to which the timer with each resolution level belongs is added according to the sequence of the trigger time of the timer from front to back, so that the timer with each resolution level is added into the corresponding timer queue, for example, for a microsecond level, if the trigger time of the timer with a certain microsecond level is 900 microseconds of the system time, the reference time of a second timer queue in the plurality of timers corresponding to the microsecond level is 800 microseconds (it can be known that the time range of the second timer queue is 800 microseconds-1000 microseconds), then, it may be determined that the timer whose trigger time is 900 microseconds of the system time belongs to a second timer queue of the plurality of corresponding timer queues, at this time, the thread corresponding to the microsecond level may add the timer to the second timer queue, and meanwhile, if the existing timer in the second timer queue exists, the timer needs to be added to the corresponding position according to the sequence of the trigger time.
The management efficiency and the execution efficiency of the timer can be improved conveniently by setting a plurality of timer queues and adding the timer into the timer queues according to the relation between the trigger time and the reference time of the timer queues.
In addition, a mutex lock (lock) may be set in the timer queue, and when the timers at the resolution levels are added to the corresponding timer queues by the corresponding threads in the order from the front to the back of the trigger time, the corresponding threads are added to the corresponding timer queues in the order from the front to the back of the trigger time only after the mutex lock of the timer queue is acquired.
The timer processing method provided by the embodiment of the application can further include:
if the temporary unsatisfied timers with the triggering time not within the time range managed by the corresponding timer queues exist, storing the temporary unsatisfied timers in a temporary linked list of the timers according to the sequence of the triggering time from front to back;
judging whether a target timer with trigger time within the time range managed by the corresponding timer queues exists in the timer temporary storage linked list or not;
and if so, adding the target timer into the corresponding timer queue according to the trigger time of the target timer and the reference time of the corresponding timer queues.
In the application, when the timers of each resolution level are added into the corresponding timer queues by using the corresponding threads according to the triggering time of the timers of each resolution level and the reference time of each timer queue corresponding to each resolution level in the sequence from the front to the back of the triggering time, if the corresponding threads find that a temporary unsatisfied timer (i.e. a timer whose triggering time is not in the time range managed by the corresponding timer queues) whose triggering time is not in the time range managed by the corresponding timer queues exists, wherein the time range managed by the corresponding timer queues is specifically determined according to the reference time and the time interval of the timer queues, specifically, the time range managed by the corresponding timer queues is the reference time of a first queue, the scheduling thread period and the reference time of the first queue, that is, if there is a temporary unsatisfied timer whose trigger time does not fall within the time range corresponding to the corresponding multiple timer queues, the temporary unsatisfied timer may be stored in the timer temporary storage linked list according to the sequence of the trigger time from front to back, specifically refer to fig. 3, which shows a schematic structural diagram of the timer temporary storage linked list provided in the embodiment of the present application, where it needs to be described that, in order to improve the convenience of management, each resolution level may respectively correspond to one timer temporary storage linked list, so that the storage of the temporary unsatisfied timer of each resolution level may be distinguished, thereby facilitating improvement of subsequent judgment and addition efficiency.
The temporary unsatisfied timers are stored in the temporary storage linked list of the timers, so that the timers can be prevented from being lost, and subsequent judgment and addition are directly performed on the basis of the temporary storage linked list of the timers, and the judgment and addition efficiency is improved.
On the basis of adding a temporary unsatisfied timer into a temporary linked list of the timer, whether a target timer with trigger time within the time range managed by a plurality of corresponding timer queues exists in the temporary linked list of the timer can be judged in real time or at regular time by utilizing a corresponding thread while executing a timing task corresponding to the timer reaching the trigger time, if so, the target timer is picked from the temporary linked list of the timer by utilizing the corresponding thread and added into the timer queue corresponding to the target timer according to the trigger time, the reference time of each corresponding timer queue and the corresponding reference time interval,
the mechanism for setting the temporary timer linked list, picking the temporary timer linked list from the temporary timer linked list when judging and meeting and adding the temporary timer linked list into a proper timer queue has the advantages that the number of the timers is not limited, and the triggering time of the timers is not limited.
The timer processing method provided by the embodiment of the application can further include:
correspondingly taking a first timer queue in a plurality of timer queues corresponding to each resolution level as a current processing queue of each resolution level;
determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable may include:
comparing the ratio of the current running time between the system starting time and the current time with the environmental variable, and the reference time of the current processing queue of the resolution level corresponding to the environmental variable;
if the reference time of the current processing queue is smaller than the specific value and the time difference between the specific value and the reference time of the current processing queue is smaller than the corresponding reference time interval, determining a timer with the trigger time smaller than the specific value in the current processing queue as a timer reaching the trigger time;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, updating the reference time of the current processing queue according to the number of the timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval, taking the next timer queue of the plurality of timer queues corresponding to the resolution level corresponding to the environment variable as the current processing queue, and returning to execute the step of comparing the current running time between the system starting time and the current time with the ratio of the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable until the timer with the trigger time larger than the ratio exists in the current processing queue.
In the application, after the corresponding multiple timer queues are created and the timers of the resolution levels are added to the corresponding timer queues according to the triggering time of the timers of the resolution levels and the reference time of the timers of the resolution levels by using the corresponding threads from front to back, the first timer queue of the multiple timer queues corresponding to the resolution levels can be correspondingly used as the current processing queue of the resolution levels, so that the subsequent determination can be directly carried out from the corresponding current processing queue when the threads are used for determining whether the triggering time of the timers of the resolution levels is reached, and the management efficiency of the timers is improved.
In addition, on the basis that the first timer queue of the multiple timer queues corresponding to each resolution level is used as the current processing queue of each corresponding resolution level, the process of determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable may specifically be:
acquiring the current running time length from starting to the current time by using the TSC, and comparing the ratio of the current running time length to an environment variable (specifically the current running time length/the environment variable) with the reference time of the current processing queue of the resolution level corresponding to the environment variable by using a corresponding thread;
if the ratio of the current running time length to the environment variable is less than the reference time of the current processing queue at the resolution level corresponding to the environment variable, it is indicated that the current time of the system does not reach the trigger time of the current processing queue, at this time, the judgment and the processing of whether the trigger time is reached or not are not carried out on the timer in the current processing queue, and the comparison between the ratio and the reference time of the next timer queue of the current processing queue is not carried out any more, meanwhile, the corresponding timer temporary storage linked list can be checked by using the thread to judge whether the target timer of which the trigger time is in the time range managed by the corresponding timer queues exists in the timer temporary storage linked list.
If the reference time of the current processing queue of the resolution level corresponding to the environment variable is less than the ratio of the current running time length to the environment variable, but the time difference between the ratio of the current running time length to the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable is smaller than the reference time interval corresponding to the resolution level corresponding to the environment variable, it indicates that the timer in the current processing queue should be processed, and at this time, after acquiring the mutex lock of the current processing queue, picking up the timers on the current processing queue according to the arrangement sequence of the timers in the current processing queue, comparing the triggering time of the picked timers with the ratio of the current running time to the environment variable, determining the timer reaching the triggering time when the triggering time is shorter, and executing a timing task corresponding to the timer reaching the triggering time; for the timers with the triggering time larger than the ratio of the current running time length to the environment variable, the current time of the system is indicated to not reach the triggering time of the timers, and therefore the timers can not be processed. When the timer is extracted, only the timer with the trigger time smaller than the ratio of the current running time to the environmental variable can be extracted.
If the reference time of the current processing queue of the resolution level corresponding to the environment variable is less than the ratio of the current running time to the environment variable, and the time difference between the ratio of the current running time to the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable is greater than or equal to the corresponding reference time interval, the reference time of the current processing queue can be updated according to the number of the timer queues corresponding to the resolution level corresponding to the environment variable and the reference time interval corresponding to the timer queues by using the reference time ═ the reference time + the number of the timer queues and the reference time interval corresponding to the timer queues, and the reference time interval corresponding to the timer queues is located after the current processing queue among the plurality of timer queues corresponding to the resolution level corresponding to the environment variable is used as the current processing queue, that is, the current processing queue points to the next timer queue in the corresponding timer queue, and returning to execute the step of comparing the ratio of the current running time length between the system starting time and the current time with the environmental variable and the reference time of the current processing queue of the resolution level corresponding to the environmental variable until the trigger time in the current processing queue is greater than the ratio of the current running time length to the environmental variable, namely, until a timer which does not reach the trigger time exists in the current processing queue. After the thread executes the timer which reaches the trigger time, the step of executing the target timer which judges whether the trigger time is in the time range managed by the corresponding multiple timer queues exists in the timer temporary storage linked list can be returned, so that the target timer can be found in time and added into the corresponding timer queue in time.
Through the above process of setting the current processing queue and performing the corresponding comparison, the determination efficiency of the timer reaching the trigger time can be improved conveniently, and all the timer queues do not need to be processed, so that the determination efficiency of the timer reaching the trigger time can be further improved.
An embodiment of the present application further provides a timer processing apparatus, see fig. 4, which shows a schematic structural diagram of the timer processing apparatus provided in the embodiment of the present application, and the timer processing apparatus may include:
the setting module 41 is configured to obtain an environment variable set according to a requirement of the system on the resolution of the timer, and set a resolution level of the timer according to the environment variable and the frequency of the CPU;
a selecting module 42, configured to select a timer corresponding to each timing task from the timers at each resolution level, and set a trigger time of the timer corresponding to each timing task according to the timing task;
and the execution module 43 is configured to determine whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable, and if so, execute a timing task corresponding to the timer reaching the trigger time.
The timer processing apparatus provided in the embodiment of the present application may further include:
the creating module is used for creating a timer queue and a thread corresponding to each resolution level after the triggering time of the corresponding timer is set according to each timing task;
and the adding module is used for adding the timers of the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by utilizing the threads.
The timer processing apparatus provided in the embodiment of the present application may further include:
and the binding module is used for binding each thread with different cores of the CPU if the number of the cores of the CPU is greater than the number of the threads after the threads corresponding to each resolution level are created.
In an embodiment of the application, a creating module of the timer processing apparatus may include:
a creating unit configured to create a plurality of timer queues corresponding to respective resolution levels, respectively;
the first determining unit is used for correspondingly determining the reference time of a first timer queue in the plurality of timer queues corresponding to each resolution level according to the running time length from the starting of the system to the completion time of the queue creation and the environment variable corresponding to each resolution level;
a second determining unit, configured to correspondingly determine, according to the frequency of the CPU, the thread scheduling cycle, and the environment variable corresponding to each resolution level, a reference time interval between two adjacent timer queues in the multiple timer queues corresponding to each resolution level, and determine, according to the reference time interval, reference times of remaining timer queues, except for the first timer queue, in the multiple corresponding timer queues;
the joining module may include:
and the first adding unit is used for adding the timers of the resolution levels into the corresponding timer queues by using the corresponding threads according to the triggering time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels from front to back.
The timer processing apparatus provided in the embodiment of the present application, the adding module may further include:
the storage unit is used for storing the temporary unsatisfied timers in the temporary storage linked list of the timers according to the sequence of the trigger time from front to back if the temporary unsatisfied timers with the trigger time not in the time range managed by the corresponding timer queues exist;
the judging unit is used for judging whether a target timer with trigger time within the time range managed by the corresponding timer queues exists in the timer temporary storage linked list or not;
and the second adding unit is used for adding the target timer into the corresponding timer queue according to the trigger time of the target timer and the reference time of the corresponding timer queues if the target timer with the trigger time within the time range managed by the corresponding timer queues exists in the timer temporary storage linked list.
In an embodiment of the application, the creating module may further include:
the processing unit is used for correspondingly taking a first timer queue in a plurality of timer queues corresponding to each resolution level as a current processing queue of each resolution level;
the execution module 43 may include:
the comparison unit is used for comparing the ratio of the current running time between the system starting time and the current time with the environmental variable and the reference time of the current processing queue of the resolution level corresponding to the environmental variable;
a third determining unit, configured to determine, if the reference time of the current processing queue is smaller than the ratio and a time difference between the ratio and the reference time of the current processing queue is smaller than a corresponding reference time interval, a timer in the current processing queue whose trigger time is smaller than the ratio as a timer that reaches the trigger time;
and the updating unit is used for updating the reference time of the current processing queue according to the number of the timer queues corresponding to the resolution levels corresponding to the environment variables and the corresponding reference time intervals if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, taking the next timer queue of the plurality of timer queues corresponding to the resolution levels corresponding to the environment variables as the current processing queue, and returning to execute the step of comparing the current running time between the system starting time and the current time with the ratio of the environment variables and the reference time of the current processing queue of the resolution levels corresponding to the environment variables until the timer with the triggering time larger than the ratio exists in the current processing queue.
An embodiment of the present application further provides a timer processing apparatus, see fig. 5, which shows a schematic structural diagram of the timer processing apparatus provided in the embodiment of the present application, and the timer processing apparatus may include:
a memory 51 for storing a computer program;
the processor 52, when executing the computer program stored in the memory 51, may implement the following steps:
acquiring an environment variable set according to the requirement of a system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of a CPU (Central processing Unit); selecting a timer corresponding to each timing task from the timers at each resolution level, and setting the trigger time of the timer corresponding to each timing task according to each timing task; and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time.
An embodiment of the present application further provides a readable storage medium, where a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the computer program may implement the following steps:
acquiring an environment variable set according to the requirement of a system on the resolution of the timer, and setting the resolution level of the timer according to the environment variable and the frequency of a CPU (Central processing Unit); selecting a timer corresponding to each timing task from the timers at each resolution level, and setting the trigger time of the timer corresponding to each timing task according to each timing task; and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time.
The readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A timer processing method, comprising:
acquiring an environment variable set according to the requirement of a system on the resolution of a timer, and setting the resolution level of the timer according to the environment variable and the frequency of a CPU (Central processing Unit);
selecting a timer corresponding to each timing task from the timers of each resolution level, and setting the trigger time of the corresponding timer according to each timing task;
and determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable or not according to the environment variable, and if so, executing a timing task corresponding to the timer reaching the trigger time.
2. The timer processing method according to claim 1, further comprising, after setting the trigger time of the timer corresponding to each of the timing tasks according to the timer task, the following steps:
establishing a timer queue and a thread corresponding to each resolution level;
and adding the timers of the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by utilizing the threads.
3. The timer processing method according to claim 2, further comprising, after creating the thread corresponding to each resolution level:
and if the number of the cores of the CPU is larger than the number of the threads, binding each thread with different cores of the CPU.
4. The timer processing method according to claim 2, wherein creating a timer queue corresponding to each resolution level comprises:
respectively creating a plurality of timer queues corresponding to each resolution level;
correspondingly determining the reference time of a first timer queue in a plurality of timer queues corresponding to each resolution level according to the running time length from the starting of the system to the completion time of queue creation and the environment variable corresponding to each resolution level;
correspondingly determining reference time intervals between two adjacent timer queues in a plurality of timer queues corresponding to each resolution level according to the frequency of the CPU, the thread scheduling period and the environment variable corresponding to each resolution level, and determining the reference time of the rest timer queues except the first timer queue in the plurality of corresponding timer queues according to the reference time intervals;
adding the timers with the corresponding resolutions into the corresponding timer queues by using the threads according to the sequence of the trigger time from front to back, wherein the sequence comprises the following steps:
and adding the timers of the resolution levels into the corresponding timer queues by utilizing the corresponding threads according to the sequence of the triggering time from front to back according to the triggering time of the timers of the resolution levels and the reference time of the timer queues corresponding to the resolution levels.
5. The timer processing method according to claim 4, further comprising:
if a temporary unsatisfied timer with trigger time not in the time range managed by the corresponding timer queues exists, storing the temporary unsatisfied timer in a temporary linked list of the timer according to the sequence of the trigger time from front to back;
judging whether a target timer with trigger time within the time range managed by the corresponding timer queues exists in the timer temporary storage linked list or not;
and if so, adding the target timer into the corresponding timer queue according to the trigger time of the target timer and the reference time of the corresponding timer queues.
6. The timer processing method according to claim 5, further comprising:
correspondingly taking a first timer queue in a plurality of timer queues corresponding to each resolution level as a current processing queue of each resolution level;
determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable, wherein the determining comprises the following steps:
comparing the ratio of the current running time of the system from the starting to the current time with the environment variable and the reference time of the current processing queue of the resolution level corresponding to the environment variable;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is smaller than the corresponding reference time interval, determining a timer with the trigger time smaller than the ratio in the current processing queue as a timer reaching the trigger time;
if the reference time of the current processing queue is smaller than the ratio and the time difference between the ratio and the reference time of the current processing queue is larger than or equal to the corresponding reference time interval, updating the reference time of the current processing queue according to the number of timer queues corresponding to the resolution level corresponding to the environment variable and the corresponding reference time interval, and a next timer queue of the plurality of timer queues corresponding to the resolution level corresponding to the environment variable is used as the current processing queue, and returning to execute the step of comparing the current running time of the system from the starting to the current time with the ratio of the environmental variable and the reference time of the current processing queue of the resolution level corresponding to the environmental variable until a timer with the trigger time larger than the ratio exists in the current processing queue.
7. A timer processing apparatus, comprising:
the setting module is used for acquiring an environment variable set according to the requirement of a system on the resolution of the timer and setting the resolution level of the timer according to the environment variable and the frequency of the CPU;
the selection module is used for selecting the timer corresponding to each timing task from the timers at each resolution level and setting the trigger time of the timer corresponding to each timing task according to each timing task;
and the execution module is used for determining whether the current time of the system reaches the trigger time of the timer corresponding to the environment variable according to the environment variable, and if so, executing the timing task corresponding to the timer reaching the trigger time.
8. The timer processing apparatus according to claim 7, further comprising:
the creating module is used for creating a timer queue and a thread corresponding to each resolution level after the triggering time of the timer corresponding to each timing task is set;
and the adding module is used for adding the timers of the corresponding resolution levels into the corresponding timer queues according to the sequence of the trigger time from front to back by utilizing the threads.
9. A timer processing apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the timer processing method according to any of claims 1 to 6 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the timer processing method according to any one of claims 1 to 6.
CN202110987948.0A 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium Active CN113742042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110987948.0A CN113742042B (en) 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110987948.0A CN113742042B (en) 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN113742042A true CN113742042A (en) 2021-12-03
CN113742042B CN113742042B (en) 2023-08-25

Family

ID=78732978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110987948.0A Active CN113742042B (en) 2021-08-26 2021-08-26 Timer processing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113742042B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474241A (en) * 2002-08-07 2004-02-11 华为技术有限公司 Dispatching method for massive timer
CN1479556A (en) * 2002-07-16 2004-03-03 雅马哈株式会社 Equipment and method for recording/reconstruction operating information related to video-frequency or music
CN105700961A (en) * 2016-02-29 2016-06-22 华为技术有限公司 Business container creation method and device
CN112650566A (en) * 2020-12-21 2021-04-13 曙光信息产业股份有限公司 Timed task processing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1479556A (en) * 2002-07-16 2004-03-03 雅马哈株式会社 Equipment and method for recording/reconstruction operating information related to video-frequency or music
CN1474241A (en) * 2002-08-07 2004-02-11 华为技术有限公司 Dispatching method for massive timer
CN105700961A (en) * 2016-02-29 2016-06-22 华为技术有限公司 Business container creation method and device
CN112650566A (en) * 2020-12-21 2021-04-13 曙光信息产业股份有限公司 Timed task processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113742042B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN102214139B (en) Automatic test performance control and debugging method facing distributed system
JP3807588B2 (en) Multi-thread processing apparatus, processing method, and computer-readable recording medium storing multi-thread program
CN110058882B (en) OPU instruction set definition method for CNN acceleration
JP6686371B2 (en) Data staging management system
EP3396542A1 (en) Database operating method and device
CN113742042B (en) Timer processing method, device, equipment and readable storage medium
CN111026947B (en) Crawler method and embedded crawler implementation method based on browser
CN113010276A (en) Task scheduling method and device, terminal equipment and storage medium
CN116702668A (en) Regression testing method and device, electronic equipment and storage medium
CN111078413A (en) Timed task execution method and device, computer equipment and storage medium
CN113672458B (en) Application program monitoring method, electronic equipment and storage medium
CN113905014B (en) Method, server and storage medium for assigning ID number to terminal device
CN110753090A (en) Task execution method and device of server cluster, computer equipment and storage medium
CN113806055A (en) Lightweight task scheduling method, system, device and storage medium
US20070010982A1 (en) Automatic time warp for electronic system simulation
CN116069471B (en) Deterministic scheduling method and device for tasks and electronic equipment
CN112667575A (en) Data packet cleaning method and device and related equipment thereof
US11720394B2 (en) Automatic code path determination
CN113504979B (en) Timer realizing method and device, real-time operating system and storage medium
CN111930475B (en) Method and device for starting ETT operation
CN114356517B (en) Method, system, electronic equipment and storage medium for managing serial bus resources
CN113934754A (en) Intelligent data synchronization method and device
CN116185837A (en) Interface testing method, device, computer equipment and readable storage medium
CN113743564A (en) Counting method and device, electronic equipment and storage medium
CN112540885A (en) CPU load value detection method and device based on user space

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant