CN109002325B - Program sleep time control method and device - Google Patents

Program sleep time control method and device Download PDF

Info

Publication number
CN109002325B
CN109002325B CN201710418542.4A CN201710418542A CN109002325B CN 109002325 B CN109002325 B CN 109002325B CN 201710418542 A CN201710418542 A CN 201710418542A CN 109002325 B CN109002325 B CN 109002325B
Authority
CN
China
Prior art keywords
precision
processor
target
time
kernel
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.)
Active
Application number
CN201710418542.4A
Other languages
Chinese (zh)
Other versions
CN109002325A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201710418542.4A priority Critical patent/CN109002325B/en
Publication of CN109002325A publication Critical patent/CN109002325A/en
Application granted granted Critical
Publication of CN109002325B publication Critical patent/CN109002325B/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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention provides a method and a device for controlling sleep time of a program, wherein the method comprises the following steps: based on the kernel of the target operating system, obtaining a target program carrying target time precision; judging whether the target time precision is higher than the first time precision; when the target time precision is judged to be higher than the first time precision, scheduling the target program to a first processor, wherein the first processor belongs to a first class of processors bound with first clock event equipment, and the first clock event equipment supports the high-precision time precision; and calling a kernel high-precision sleep function corresponding to the first processor to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision. So as to realize reasonable control of the interruption (sleep) time of different services running in the electronic equipment.

Description

Program sleep time control method and device
Technical Field
The invention relates to the technical field of embedded software, in particular to a sleep time control method and device of a program.
Background
In order to meet the requirement of a user on the time precision of the electronic equipment, Linux provides a software framework supporting a high-precision clock, namely a software framework supporting a clock with the time precision higher than the preset time precision (for example, 10 ms). When an electronic device based on an arm (advanced RISC machines) hardware architecture plus a Linux software architecture starts the software architecture supporting the high-precision clock (i.e. starts a kernel high-precision sleep function), and selects a high-precision clock (a clock with a time precision higher than 10ms) as a clock event device to be bound to a processor (e.g. a CPU (Central Processing Unit)), a clock interrupt (sleep) period of the electronic device may reach a high-precision time precision, for example: the time precision of the clock interrupt (sleep) period can reach us (microsecond) level, ns (nanosecond) level and the like.
When the operating system starts the software framework supporting the high-precision clock for the Linux electronic device, and the high-precision clock is selected as the clock event device and bound to the processor, the high-precision clock interrupt (sleep) cycle control is provided for the service (for example, the control of the stepping motor) which is operated by the electronic device and has high time requirement, however, the high-precision clock interrupt (sleep) cycle control affects other services which are operated by the electronic device and have low time precision requirement (for example, the time precision is not higher than 10 ms). For example: and processing the video data. In general, the frame rate of the video data is generally 25 frames per second, that is, the electronic device can process one frame of video data every 40ms on average. If the electronic device is started and the sleep time of the kernel high-precision sleep function is set to be 1us (for example, usleep (1)) and a high-precision clock is selected as a clock event device to be bound into the processor, the electronic device will generate an interrupt every 1us, at this time, the processing service of the video data will be interrupted every 1us (namely, a program corresponding to the processing service of the video data sleeps every 1 us), so that the processing service of the video data is frequently interrupted.
Therefore, in the prior art, when the electronic device starts the software framework supporting the high-precision clock and selects the high-precision clock as the clock event device to be bound into the processor, the problem that the control of the interrupt (sleep) period of different services running in the electronic device is not reasonable enough occurs.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for controlling sleep time of a program, so as to implement reasonable control of interrupt (sleep) periods of different services running in an electronic device. The specific technical scheme is as follows:
in one aspect, an embodiment of the present invention provides a method for controlling sleep time of a program, where the method includes:
obtaining a target program based on a kernel of a target operating system, wherein the target program carries target time precision;
judging whether the target time precision is higher than a first time precision or not;
when the target time precision is judged to be higher than the first time precision, scheduling the target program to a first processor, wherein the first processor belongs to a first class of processors bound with a first clock event device, and the first clock event device is as follows: clock event equipment supporting high-precision time precision;
based on the first processor, calling a kernel high-precision sleep function corresponding to the first processor to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision.
Optionally, before the step of obtaining the target program based on the kernel of the target operating system, the method further includes a process of configuring the kernel of the target operating system, where the process includes:
starting high-precision clock configuration of a kernel of the target operating system;
based on the started high-precision clock configuration, calling the kernel high-precision sleep function corresponding to the high-precision clock configuration corresponding to at least two processors corresponding to the target operating system;
determining each processor set as a second type of processor according to preset setting information and the identifier of each processor in the at least two processors;
setting a second time precision of the kernel high-precision sleep function corresponding to each processor in the second class of processors to a third time precision, wherein the third time precision is not higher than the first time precision, and each processor in the second class of processors has bound thereto a second clock event device, wherein the second clock event device is: a clock event device supporting low precision time precision;
starting a kernel of the target operating system and determining a high-precision clock;
registering the determined high-precision clock as the first clock event device into a kernel of the target operating system, and updating a second clock event device set as a binding of each processor in a first class of processors to the first clock event device, wherein the second class of processors are: a processor of the at least two processors other than the first type of processor.
Optionally, after the step of setting the second time precision of the kernel high-precision sleep function corresponding to each processor in the second class of processors to a third time precision, the configuration process further includes:
binding a first program on a target peripheral device to any one of the processors of the second class;
before the step of determining whether the target time accuracy is higher than the first time accuracy, the method further comprises:
determining whether the target program belongs to the first program;
and when the target time precision is determined not to belong to the time precision, executing the step of judging whether the target time precision is higher than the first time precision.
Optionally, when it is determined that the target time accuracy is not higher than the first time accuracy, the method further includes:
scheduling the target program to a second processor, wherein the second processor belongs to the second class of processors;
based on the second processor, calling the kernel high-precision sleep function corresponding to the second processor to enable the target program to run on the second processor, and sleeping based on a third time precision set by the kernel high-precision sleep function, a second clock event device bound by the second processor and the target time precision.
Optionally, after the step of updating the second clock event device bound to each processor set in the first class of processors to the first clock event device, the configuration process further includes:
associating each processor in the first class of processors with a preset high-precision sleep function;
the step of scheduling the target program to a first processor includes:
and calling the preset high-precision sleep function, and scheduling the target program to a first processor.
Optionally, the step of calling, based on the first processor, a kernel high-precision sleep function corresponding to the first processor includes:
determining the kernel high-precision sleep function corresponding to the first processor based on the first processor;
judging whether the first order of magnitude of the target time precision is the same as the second order of magnitude corresponding to the kernel high-precision sleep function or not;
and calling the kernel high-precision sleep function corresponding to the first processor when the first order of magnitude is judged to be the same as the second order of magnitude.
Optionally, when the first magnitude is determined to be different from the second magnitude, the method further comprises:
converting the target time precision from the first order of magnitude to the second order of magnitude;
and calling the kernel high-precision sleep function corresponding to the first processor.
In another aspect, an embodiment of the present invention provides a sleep time control apparatus for a program, where the apparatus includes:
the system comprises an obtaining module, a processing module and a processing module, wherein the obtaining module is used for obtaining a target program based on a kernel of a target operating system, and the target program carries target time precision;
the judging module is used for judging whether the target time precision is higher than first time precision or not;
a first scheduling module, configured to schedule the target program to a first processor when it is determined that the target time precision is higher than the first time precision, where the first processor belongs to a first class of processors to which a first clock event device is bound, and the first clock event device is: clock event equipment supporting high-precision time precision;
the first calling module is used for calling a kernel high-precision sleep function corresponding to the first processor based on the first processor so as to enable the target program to run on the first processor, and the target program is used for sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision.
Optionally, the apparatus further includes a configuration module configured to configure the kernel of the target operating system, where the configuration module includes a starting unit, a calling unit, a first determining unit, a setting unit, a second determining unit, and a registration setting unit;
the starting unit is used for starting the high-precision clock configuration of the kernel of the target operating system before the kernel of the target operating system obtains the target program;
the calling unit is used for calling the kernel high-precision sleep function corresponding to the high-precision clock configuration corresponding to at least two processors corresponding to the target operating system based on the started high-precision clock configuration;
the first determining unit is configured to determine each processor set as a second type of processor according to preset setting information and an identifier of each processor of the at least two processors;
the setting unit is configured to set a second time precision of the kernel high-precision sleep function corresponding to each of the second type of processors to a third time precision, where the third time precision is not higher than the first time precision, and each of the second type of processors has bound thereto a second clock event device, where the second clock event device is: a clock event device supporting low precision time precision;
the second determining unit is used for starting the kernel of the target operating system and determining a high-precision clock;
the register setting unit is configured to register the determined high-precision clock as the first clock event device into a kernel of the target operating system, and update a second clock event device, which is set to be bound by each processor in a first class of processors, as the first clock event device, where the second class of processors is: a processor of the at least two processors other than the first type of processor.
Optionally, the configuration module further comprises a binding unit;
the binding unit is used for binding a first program related to a target peripheral to any one of the second type of processors after the second time precision of the kernel high-precision sleep function corresponding to each processor in the second type of processors is set to be a third time precision;
the apparatus also includes a determination module;
the determining module is configured to determine whether the target program belongs to the first program before the determining whether the target time accuracy is higher than a first time accuracy; and when the judgment module is determined not to belong to the network, triggering the judgment module.
Optionally, the apparatus further includes a second scheduling module and a second calling module;
the second scheduling module is configured to schedule the target program to a second processor when it is determined that the target time precision is not higher than the first time precision, where the second processor belongs to the second class of processors;
the second calling module is configured to call, based on the second processor, the kernel high-precision sleep function corresponding to the second processor, so that the target program runs on the second processor, and perform sleep based on a third time precision set by the kernel high-precision sleep function, the second clock event device bound to the second processor, and the target time precision.
Optionally, the configuration module further comprises an association unit;
the association unit is configured to associate each of the first type of processors with a preset high-precision sleep function after the second clock event device bound to each of the first type of processors is updated to the first clock event device;
the first scheduling module is specifically configured to
And calling the preset high-precision sleep function, and scheduling the target program to a first processor.
Optionally, the first calling module includes a third determining unit, a determining unit and a first calling unit;
the third determining unit is configured to determine, based on the first processor, the kernel high-precision sleep function corresponding to the first processor;
the judging unit is used for judging whether a first order of magnitude of the target time precision is the same as a second order of magnitude corresponding to the kernel high-precision sleep function or not;
the first calling unit is configured to call the kernel high-precision sleep function corresponding to the first processor when it is determined that the first order of magnitude is the same as the second order of magnitude.
Optionally, the first calling module further includes a conversion unit and a second calling unit;
the conversion unit is used for converting the target time precision from the first order of magnitude to the second order of magnitude when the first order of magnitude is judged to be different from the second order of magnitude;
the second calling unit is used for calling the kernel high-precision sleep function corresponding to the first processor.
On the other hand, an embodiment of the present invention provides an electronic device, including a multiprocessor, a communication interface, a memory, and a communication bus, where the multiprocessor and the communication interface are used, and the memory completes mutual communication through the communication bus;
a memory for storing a computer program;
any processor, when executing the computer program stored in the memory, implements the sleep time control method of the program provided in the embodiments of the present invention.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements a sleep time control method of the foregoing program provided in an embodiment of the present invention.
In the embodiment of the invention, a target program carrying target time precision is obtained based on a kernel of a target operating system; judging whether the target time precision is higher than the first time precision; when the target time precision is judged to be higher than the first time precision, scheduling the target program to a first processor, wherein the first processor belongs to a first class of processors bound with first clock event equipment, and the first clock event equipment supports the high-precision time precision; and calling a kernel high-precision sleep function corresponding to the first processor to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision.
Whether the target program is operated on a first processor belonging to a first type of processor is determined according to the target time precision and the first time precision carried by the target program, the first type of processor is bound with a first clock event device supporting the high-precision time precision, and a kernel high-precision sleep function can be called, so that the target program with high requirement on the time precision can be realized, and the high-precision sleep (interrupt) time can be controlled. In the embodiment of the invention, the high-precision sleep (interrupt) time is controlled only for the target program with high time precision requirement (the target time precision is higher than the first time precision), so that the sleep time of different services operated by the electronic equipment is reasonably controlled. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a sleep time control method for a program according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a configuration process for a kernel of a target operating system;
fig. 3 is a schematic structural diagram of a sleep time control apparatus for a program according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a configuration module;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Embodiments of the present invention provide a method and an apparatus for controlling sleep time of a program, so as to implement reasonable control of an interrupt (sleep) period of a service running in an electronic device.
As shown in fig. 1, an embodiment of the present invention provides a method for controlling sleep time of a program, which may include the following steps:
s101: obtaining a target program based on a kernel of a target operating system, wherein the target program carries target time precision;
it should be noted that the embodiment of the present invention may be applied to any electronic device based on an SMP (symmetric Multi-Processing) hardware architecture and based on a target operating system software architecture, where the target operating system is an operating system that may be provided with a software architecture supporting a high-precision clock, for example: linux. That is, the electronic device includes a multiprocessor (e.g., a Central Processing Unit (CPU)).
In addition, any processor in the electronic device may execute the sleep time control flow of the program provided in the embodiment of the present invention. That is to say, the processor executing the sleep time control flow of the program provided in the embodiment of the present invention may be a first processor mentioned later, a second processor mentioned later, or any one of other processors except the first processor and the second processor in the electronic device.
The kernel of the target operating system may refer to a core portion of the target operating system, and the kernel of the target operating system is mainly responsible for managing the operation of a process, a memory, an external device (peripheral) driver, a file, a network system resource, and the like of the target operating system, and determines the performance and stability of the target operating system. Wherein a process may be composed of one or more threads.
The target program may be a target thread or a target process.
The electronic device may obtain the target program based on the kernel of the target operating system, and execute a sleep time control procedure of a subsequent program based on target time accuracy carried by the target program. The target time precision carried by the target program can identify the sleep (interrupt) time required by the target program.
S102: judging whether the target time precision is higher than the first time precision;
s103: when the target time precision is judged to be higher than the first time precision, the target program is dispatched to a first processor, wherein the first processor belongs to a first type of processor bound with a first clock event device, and the first clock event device is as follows: clock event equipment supporting high-precision time precision;
the first time precision may be a preset time precision, and is used for determining whether the target program requires high-precision sleep time control. When the electronic device determines that the target time accuracy is higher than the first time accuracy, it may be determined that the target program requires high-accuracy sleep time control, and at this time, the target program may be scheduled to a first processor belonging to a first class of processors (a first clock event device that has bound and supports high-accuracy time accuracy), and then a sleep time control procedure of a subsequent program may be performed.
In the embodiment of the present invention, the time precision higher than the first time precision may be referred to as a high-precision time precision, and the clock supporting the time precision higher than the first time precision may be referred to as a high-precision clock; conversely, a time precision not higher than the first time precision may be referred to as a low-precision time precision, and a clock that does not support a time precision higher than the first time precision may be referred to as a low-precision clock. For example: when the first time precision is 10ms, the time precision higher than 10ms is called high-precision time precision, and the clock supporting the time precision higher than 10ms is called high-precision clock; conversely, a time accuracy of not more than 10ms is referred to as a low-accuracy time accuracy, a clock that does not support a time accuracy of more than 10ms is referred to as a low-accuracy clock, and so on.
In order to realize high-precision control of the sleep time of the target program, the clock event device bound to the processor running the target program needs to be capable of supporting high-precision time precision, that is, the first clock event device bound to the first processor is: a clock event device supporting high precision time accuracy. For example: when the target time precision carried by the target program is 1ms, the time precision supported by the first clock event device is not less than 1 ms.
S104: and calling a kernel high-precision sleep function corresponding to the first processor based on the first processor so as to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision.
It can be understood that the second time precision of the kernel high-precision sleep function corresponding to the first processor is not lower than the target time precision, so that the high-precision sleep time control of the target program can be realized. For example, when the target time precision carried by the target program is 10ns, the second time precision of the kernel high-precision sleep function corresponding to the first processor must not be less than 10ns, for example: the second time precision may be 1 ns.
It should be noted that, after the electronic device calls the kernel high-precision sleep function corresponding to the first processor based on the first processor, the target program starts to run on the first processor, and the first clock event device bound to the first processor starts to time; when the timing of the first clock event equipment reaches the target time precision, the first processor is interrupted once, the target program sleeps once, and the control of the sleeping time of the target program is realized.
By applying the embodiment of the invention, whether the target program is operated on the first processor belonging to the first type of processor is determined according to the target time precision and the first time precision carried by the target program, the first type of processor is bound with the first clock event device supporting the high-precision time precision, and can call the kernel high-precision sleep function, so that the target program with high requirement on the time precision can be realized, and the high-precision sleep (interrupt) time can be controlled. In the embodiment of the invention, the high-precision sleep (interrupt) time is controlled only for the target program with high time precision requirement (the target time precision is higher than the first time precision), and the reasonable control of the sleep time of different services operated by the electronic equipment can be realized. It can be understood that the electronic device runs the service, that is, runs the program corresponding to the service.
In an implementation manner, as shown in fig. 2, before the step of obtaining the target program (S101) based on the kernel of the target operating system, the method for controlling sleep time of a program according to an embodiment of the present invention further includes a process of configuring the kernel of the target operating system, where the process may include:
s201: starting high-precision clock configuration of a kernel of a target operating system;
s202: based on the started high-precision clock configuration, calling at least two processors corresponding to a target operating system to configure a corresponding kernel high-precision sleep function by the high-precision clock; the call of the kernel high-precision sleep function can be realized by calling the sys _ nanosleep function, namely calling the nanosleep function through the target operating system;
s203: determining each processor set as a second type of processor according to preset setting information and the identifier of each processor in the at least two processors;
s204: setting a second time precision of the kernel high-precision sleep function corresponding to each processor in the second type of processors to be a third time precision, wherein the third time precision is not higher than the first time precision, and each processor in the second type of processors is bound with a second clock event device, wherein the second clock event device is: a clock event device supporting low precision time precision;
s205: starting a kernel of a target operating system and determining a high-precision clock;
s206: registering the determined high-precision clock as a first clock event device into a kernel of a target operating system, and updating a second clock event device bound to each processor set as a first type of processor into the first clock event device, wherein the second type of processor is as follows: a processor of the at least two processors other than the first type of processor.
It should be noted that, the electronic device may start the high-precision clock configuration of the kernel of the target operating system by receiving and responding to a start instruction triggered by a user, so that the electronic device starts a software framework supporting a high-precision clock. In one implementation, the initiation of the HIGH precision clock configuration for the kernel of the target operating system may be achieved by initiating "configure _ HIGH _ RES _ TIMERS".
The preset setting information is preset information and may include information describing which processors are set as the first type of processors and information describing which processors are set as the second type of processors. Specifically, the preset setting information may include: and the corresponding relation between the identification of each processor in the at least two processors and the set result. For example, there are 3 processors in the electronic device, that is, the target operating system corresponds to 3 processors, and the identifiers of the 3 processors are: processor A corresponds to identifier A, processor B corresponds to identifier B and processor C corresponds to identifier C. The preset setting information may include the following contents: identify a-processors of a first type (set result), identify B-processors of a first type (set result); identify C-processor of the second type (set result).
In addition, it should be noted that the identifier of each of the at least two processors may be: the ID (Identity), name, serial number, etc. of the processor may uniquely determine information of each processor.
It can be understood that a plurality of clock event devices may be registered in the kernel of the target operating system, where each processor in the target operating system may correspond to one clock event device, and the clock event device may provide a clock event service for the corresponding processor, that is, clock the corresponding processor. The clock event device may be identified by "clock _ event _ device".
It is emphasized that the high-precision clock configuration of the kernel of the target operating system is started, so that the electronic device has a software architecture supporting the high-precision clock; and registering the high-precision clock serving as a first clock event device into a kernel of the target operating system, and updating a second clock event device which is set to be bound by each processor in the first type of processors into the first clock event device, so that the electronic device has a hardware framework supporting the high-precision clock. The software architecture and the hardware architecture configured for each processor in the first type of processor enable each processor in the first type of processor in the electronic device to realize high-precision sleep time control of the running program.
It should be noted that, in the embodiment of the present invention, the electronic device is based on an SMP hardware architecture, and at least two processors may exist in the electronic device. When the high-precision clock configuration of the kernel of the target operating system is started, the high-precision clock configuration corresponding to the kernel high-precision sleep function can be called corresponding to at least two processors corresponding to the target operating system. In order to ensure reasonable control of sleep time of a service running in the electronic equipment and reduce the running load of a processor in the electronic equipment after starting high-precision clock configuration to a certain extent. It is necessary to configure a processor (processor of the second type) that can support time accuracy of low accuracy, and to configure a processor (processor of the first type) that can support time accuracy of high accuracy.
Specifically, the second time precision of the kernel high-precision sleep function corresponding to each processor in the second type of processor may be set to a third time precision (the third time precision is not higher than the first time precision), and each processor in the second type of processor has bound thereto a second clock event device supporting the low-precision time precision, so that each processor in the second type of processor can implement sleep time control supporting the low-precision time precision on the software architecture and the hardware architecture.
In addition, the high-precision clock can be determined according to the identification of the clock in the target operating system, and further, the high-precision clock is used as a first clock event device to be registered in the kernel of the target operating system and is bound to each processor in the first type of processors. It is understood that in some scenarios, each processor in the first class of processors has bound a second clock event device by default, and in the embodiment of the present invention, the second clock event device bound by default by each processor in the first class of processors needs to be updated to the first clock event device, so that each processor in the first class of processors can implement control of sleep time supporting high precision time precision on a hardware architecture. Moreover, after the high-precision clock configuration of the kernel of the target operating system is started, each processor in the first type of processors can call a kernel high-precision sleep function, and the sleep time control supporting high-precision time precision can be realized on a software framework.
Subsequently, based on the kernel of the target operating system after the configuration is completed, after the electronic device obtains the target program, whether the target program needs high-precision sleep time control can be determined according to the target time precision and the first time precision carried by the target program. When the target time precision is higher than the first time precision, namely the control of the sleep time of the target program needing high precision is determined, at the moment, the target program can be dispatched to any one of the first type of processors to run; when the target time precision is not higher than the first time precision, that is, the target program does not need the high-precision control of the sleep time, at this time, the target program can be dispatched to any processor in the second type of processors to run.
It is emphasized that in embodiments of the present invention, at least one processor configured as a first type of processor must be present in the electronic device, and at least one processor configured as a second type of processor must be present. In one implementation, the processors included in the SMP hardware architecture may be CPUs, and in this case, different CPUs are generally identified by "CPUn", and in one arrangement, the CPU0 may be set as a first type of CPU, and other CPUs except the CPU0 may be set as a second type of CPU.
In one implementation, there may be a service with low requirement on time accuracy in the services running in the electronic device, that is, there is a program that does not need high-accuracy sleep time control (that is, the time accuracy carried by the program is not higher than the first time accuracy). It can be understood that the operation burden of the processor is greater when the electronic device realizes the control of the sleep time with high accuracy, compared to when the electronic device realizes the control of the sleep time with low accuracy. In order to reduce the operation load on the processor in the electronic device, the program that does not require high-precision sleep time control may be scheduled to be executed on a processor that supports low-precision time precision, and specifically, when it is determined that the target time precision is not higher than the first time precision, the method may further include:
dispatching the target program to a second processor, wherein the second processor belongs to a second class of processors;
and calling a kernel high-precision sleep function corresponding to the second processor based on the second processor so as to enable the target program to run on the second processor, and sleeping based on the third time precision set by the kernel high-precision sleep function, the second clock event device bound by the second processor and the target time precision.
In one implementation, the interrupt (sleep) frequency of some peripherals (external devices relative to the electronic device) is high, and the processor is burdened with running when the electronic device implements high-precision sleep time control, as compared to when the electronic device implements low-precision sleep time control. At this time, in order to ensure the accuracy of the time precision of the first type of processor and reduce the operation load of the first type of processor, the program related to the peripheral may be directly bound to any one of the second type of processors, and when the program related to the peripheral is obtained based on the kernel of the target operating system, the program related to the peripheral may be directly scheduled to the bound processor so that the program related to the peripheral is operated on the bound processor (belonging to the second type of processor), and the sleep may be performed based on the third time precision of the kernel high-precision sleep function corresponding to the bound processor, the second clock event device bound to the bound processor, and the time precision corresponding to the program related to the peripheral.
Specifically, after the step of setting the second time precision of the kernel high-precision sleep function corresponding to each processor in the second class of processors to the third time precision (S204), the configuration process may further include:
binding a first program related to the target peripheral device to any one of the second type of processors;
before the step of determining whether the target time accuracy is higher than the first time accuracy (S102), the method may further include:
determining whether the target program belongs to a first program;
when it is determined not to belong to, S102 is executed.
The first program related to the target peripheral includes, but is not limited to, a program related to a network interrupt, a program related to a USB (Universal Serial Bus) interrupt, a program related to a SATA (Serial Advanced Technology Attachment, which is an industry-standard-based Serial hardware driver interface) interrupt, a program related to a WIFI (WIreless Fidelity) driver, and a program related to a bluetooth function.
The electronic device may add a tag to the first program of the bound processor, so that when the electronic device runs the first program, the first program may be directly dispatched to the bound processor according to the tag.
In one implementation, in order to facilitate the sleep time control flow of the electronic device executing the program, after the step of updating the second clock event device bound to each processor set as the first type of processor as the first clock event device, the configuration process may further include:
associating each processor in the first class of processors with a preset high-precision sleep function;
the step of dispatching the target program to the first processor (S103) may include:
and calling a preset high-precision sleep function, and scheduling the target program to the first processor.
It can be understood that the electronic device may directly implement scheduling the target program to the first processor by calling the preset high-precision sleep function, and execute a sleep time control procedure of a subsequent program. The preset high-precision sleep function can be identified by "hires _ sleep".
In some scenarios, there may be a case where a first order of magnitude of the target time precision carried by the target program is different from a second order of magnitude of the time precision corresponding to the kernel high-precision sleep function, that is, a unit of the target time precision is different from a unit of the time precision corresponding to the kernel high-precision sleep function. In order to better realize the control of the sleep time of the target program, whether the first order of magnitude is the same as the second order of magnitude may be judged first. When the first order of magnitude is judged to be the same as the second order of magnitude, the kernel high-precision sleep function can be directly called; when the first order of magnitude is different from the second order of magnitude, the first order of magnitude of the target time precision needs to be converted into the second order of magnitude, and then, a kernel high-precision sleep function is called.
In one implementation, the step of calling, based on the first processor, a kernel high-precision sleep function (S104) corresponding to the first processor may include:
determining a kernel high-precision sleep function corresponding to the first processor based on the first processor;
judging whether the first order of magnitude of the target time precision is the same as the second order of magnitude corresponding to the kernel high-precision sleep function or not;
and calling a kernel high-precision sleep function corresponding to the first processor when the first order of magnitude is judged to be the same as the second order of magnitude.
In another implementation, when it is determined that the first magnitude is different from the second magnitude, the method may further include:
converting the target time precision from a first order of magnitude to a second order of magnitude;
and calling a kernel high-precision sleep function corresponding to the first processor.
For example, the target time precision carried by the target program is 1ms, i.e. the first number is very 10-3s, and the time precision of the kernel high precision sleep function corresponding to the first processor is 1ns, i.e. the second order of magnitude is 10-9s, at this time, it is necessary to convert the first number of poles of the target time precision to the second number of poles, i.e., 1ms to 103ns, and then calling the corresponding kernel high-precision sleep function of the first processor.
Corresponding to the above method embodiment, an embodiment of the present invention provides a programmed sleep time control apparatus, and as shown in fig. 3, the apparatus may include:
an obtaining module 310, configured to obtain a target program based on a kernel of a target operating system, where the target program carries a target time precision;
a determining module 320, configured to determine whether the target time precision is higher than a first time precision;
a first scheduling module 330, configured to schedule the target program to a first processor when it is determined that the target time precision is higher than the first time precision, where the first processor belongs to a first class of processors to which a first clock event device is bound, and the first clock event device is: clock event equipment supporting high-precision time precision;
a first calling module 340, configured to call, based on the first processor, a kernel high-precision sleep function corresponding to the first processor, so that the target program runs on the first processor, and perform sleep based on the second time precision of the kernel high-precision sleep function, the first clock event device bound to the first processor, and the target time precision.
By applying the embodiment of the invention, whether the target program is operated on the first processor belonging to the first type of processor is determined according to the target time precision and the first time precision carried by the target program, the first type of processor is bound with the first clock event device supporting the high-precision time precision, and can call the kernel high-precision sleep function, so that the target program with high requirement on the time precision can be realized, and the high-precision sleep (interrupt) time can be controlled. In the embodiment of the invention, the high-precision sleep (interrupt) time is controlled only for the target program with high time precision requirement (the target time precision is higher than the first time precision), and the reasonable control of the sleep time of different services operated by the electronic equipment can be realized. It can be understood that when the electronic device runs the service, the electronic device runs the program corresponding to the service.
In one implementation, as shown in fig. 4, the apparatus may further include a configuration module 400 configured to configure the kernel of the target operating system, where the configuration module includes a starting unit 401, a calling unit 402, a first determining unit 403, a setting unit 404, a second determining unit 405, and a registration setting unit 406;
the starting unit 401 is configured to start the high-precision clock configuration of the kernel of the target operating system before the kernel of the target operating system obtains the target program;
the calling unit 402 is configured to call, based on the started high-precision clock configuration, the kernel high-precision sleep function corresponding to the high-precision clock configuration, corresponding to at least two processors corresponding to the target operating system;
the first determining unit 403 is configured to determine each processor set as a second type of processor according to preset setting information and an identifier of each processor of the at least two processors;
the setting unit 404 is configured to set a second time precision of the kernel high-precision sleep function corresponding to each of the second type of processors to a third time precision, where the third time precision is not higher than the first time precision, and each of the second type of processors has bound thereto a second clock event device, where the second clock event device is: a clock event device supporting low precision time precision;
the second determining unit 405 is configured to start a kernel of the target operating system, and determine a high-precision clock;
the register setting unit 406 is configured to register the determined high-precision clock as the first clock event device into the kernel of the target operating system, and update a second clock event device bound to each processor set as a first type of processor as the first clock event device, where the second type of processor is: a processor of the at least two processors other than the first type of processor.
In one implementation, the configuration module 400 may further include a binding unit;
the binding unit is used for binding a first program related to a target peripheral to any one of the second type of processors after the second time precision of the kernel high-precision sleep function corresponding to each processor in the second type of processors is set to be a third time precision;
the apparatus may also include a determination module;
the determining module is configured to determine whether the target program belongs to the first program before the determining whether the target time accuracy is higher than a first time accuracy; when it is determined not to belong to, the determination module 320 is triggered.
In one implementation, the apparatus may further include a second scheduling module and a second calling module;
the second scheduling module is configured to schedule the target program to a second processor when it is determined that the target time precision is not higher than the first time precision, where the second processor belongs to the second class of processors;
the second calling module is configured to call, based on the second processor, the kernel high-precision sleep function corresponding to the second processor, so that the target program runs on the second processor, and perform sleep based on a third time precision set by the kernel high-precision sleep function, the second clock event device bound to the second processor, and the target time precision.
In one implementation, the configuration module 400 may further include an association unit;
the association unit is configured to associate each of the first type of processors with a preset high-precision sleep function after the second clock event device bound to each of the first type of processors is updated to the first clock event device;
the first scheduling module 330 is specifically configured to
And calling the preset high-precision sleep function, and scheduling the target program to a first processor.
In one implementation manner, the first calling module 340 includes a third determining unit, a determining unit and a first calling unit;
the third determining unit is configured to determine, based on the first processor, the kernel high-precision sleep function corresponding to the first processor;
the judging unit is used for judging whether a first order of magnitude of the target time precision is the same as a second order of magnitude corresponding to the kernel high-precision sleep function or not;
the first calling unit is configured to call the kernel high-precision sleep function corresponding to the first processor when it is determined that the first order of magnitude is the same as the second order of magnitude.
In one implementation, the first calling module 340 further includes a conversion unit and a second calling unit;
the conversion unit is used for converting the target time precision from the first order of magnitude to the second order of magnitude when the first order of magnitude is judged to be different from the second order of magnitude;
the second calling unit is used for calling the kernel high-precision sleep function corresponding to the first processor.
Corresponding to the above method embodiments, the present invention provides an electronic device, as shown in fig. 5, including multiple processors 510, a communication interface 520, a memory 530 and a communication bus 540, where the multiple processors 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 540,
a memory 530 for storing a computer program;
any processor 510, when executing the computer program stored in the memory 530, performs the following steps:
obtaining a target program based on a kernel of a target operating system, wherein the target program carries target time precision;
judging whether the target time precision is higher than a first time precision or not;
when the target time precision is judged to be higher than the first time precision, scheduling the target program to a first processor, wherein the first processor belongs to a first class of processors bound with a first clock event device, and the first clock event device is as follows: clock event equipment supporting high-precision time precision;
based on the first processor, calling a kernel high-precision sleep function corresponding to the first processor to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision.
By applying the embodiment of the invention, whether the target program is operated on the first processor belonging to the first type of processor is determined according to the target time precision and the first time precision carried by the target program, the first type of processor is bound with the first clock event device supporting the high-precision time precision, and can call the kernel high-precision sleep function, so that the target program with high requirement on the time precision can be realized, and the high-precision sleep (interrupt) time can be controlled. In the embodiment of the invention, the high-precision sleep (interrupt) time is controlled only for the target program with high time precision requirement (the target time precision is higher than the first time precision), and the reasonable control of the sleep time of different services operated by the electronic equipment can be realized. It can be understood that when the electronic device runs the service, the electronic device runs the program corresponding to the service.
The electronic device may be an electronic device based on an SMP (symmetric Multi-Processing) hardware architecture and based on a target operating system software architecture, where the target operating system is an operating system that may be provided with a software architecture supporting a high-precision clock, for example: linux. Each processor of the aforementioned multiple processors may be a general-purpose processor, such as: a Central Processing Unit (CPU), etc.
Any processor in the multiple processors may execute the computer program stored in the memory, so as to implement the sleep time control method of the program provided by the embodiment of the present invention. That is, any one of the processors executing the computer program stored in the memory may be the first processor, the second processor, or any one of the processors other than the first processor and the second processor in the electronic device.
The communication Bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) Bus, an Extended Industry Standard Architecture (EISA) Bus, or an ARM Bus (e.g., amba (Advanced Microcontroller Bus Architecture) on-chip Bus, APB (Advanced Peripheral Bus)), and so on. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
Corresponding to the above method embodiment, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements a sleep time control method of the above program, and the method may include the steps of:
obtaining a target program based on a kernel of a target operating system, wherein the target program carries target time precision;
judging whether the target time precision is higher than a first time precision or not;
when the target time precision is judged to be higher than the first time precision, scheduling the target program to a first processor, wherein the first processor belongs to a first class of processors bound with a first clock event device, and the first clock event device is as follows: clock event equipment supporting high-precision time precision;
based on the first processor, calling a kernel high-precision sleep function corresponding to the first processor to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision.
By applying the embodiment of the invention, whether the target program is operated on the first processor belonging to the first type of processor is determined according to the target time precision and the first time precision carried by the target program, the first type of processor is bound with the first clock event device supporting the high-precision time precision, and can call the kernel high-precision sleep function, so that the target program with high requirement on the time precision can be realized, and the high-precision sleep (interrupt) time can be controlled. In the embodiment of the invention, the high-precision sleep (interrupt) time is controlled only for the target program with high time precision requirement (the target time precision is higher than the first time precision), and the reasonable control of the sleep time of different services operated by the electronic equipment can be realized. It can be understood that when the electronic device runs the service, the electronic device runs the program corresponding to the service.
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. Also, 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 only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. 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.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A method for sleep time control of a program, the method comprising:
obtaining a target program based on a kernel of a target operating system, wherein the target program carries target time precision;
judging whether the target time precision is higher than a first time precision or not;
when the target time precision is judged to be higher than the first time precision, scheduling the target program to a first processor, wherein the first processor belongs to a first class of processors bound with a first clock event device, and the first clock event device is as follows: clock event equipment supporting high-precision time precision;
calling a kernel high-precision sleep function corresponding to the first processor based on the first processor so as to enable the target program to run on the first processor, and sleeping based on the second time precision of the kernel high-precision sleep function, the first clock event device bound by the first processor and the target time precision;
the step of calling the kernel high-precision sleep function corresponding to the first processor based on the first processor comprises the following steps:
determining the kernel high-precision sleep function corresponding to the first processor based on the first processor;
judging whether the first order of magnitude of the target time precision is the same as the second order of magnitude corresponding to the kernel high-precision sleep function or not;
and calling the kernel high-precision sleep function corresponding to the first processor when the first order of magnitude is judged to be the same as the second order of magnitude.
2. The method of claim 1, wherein prior to the step of obtaining the target program based on the target operating system kernel, the method further comprises a process of configuring the target operating system kernel, the process comprising:
starting high-precision clock configuration of a kernel of the target operating system;
based on the started high-precision clock configuration, calling the kernel high-precision sleep function corresponding to the high-precision clock configuration corresponding to at least two processors corresponding to the target operating system;
determining each processor set as a second type of processor according to preset setting information and the identifier of each processor in the at least two processors;
setting a second time precision of the kernel high-precision sleep function corresponding to each processor in the second class of processors to a third time precision, wherein the third time precision is not higher than the first time precision, and each processor in the second class of processors has bound thereto a second clock event device, wherein the second clock event device is: a clock event device supporting low precision time precision;
starting a kernel of the target operating system and determining a high-precision clock;
registering the determined high-precision clock as the first clock event device into a kernel of the target operating system, and updating a second clock event device set as a binding of each processor in a first class of processors to the first clock event device, wherein the second class of processors are: a processor of the at least two processors other than the first type of processor.
3. The method of claim 2, wherein after the step of setting the second time precision of the kernel high precision sleep function for each processor in the second class of processors to a third time precision, the configuration process further comprises:
binding a first program on a target peripheral device to any one of the processors of the second class;
before the step of determining whether the target time accuracy is higher than the first time accuracy, the method further comprises:
determining whether the target program belongs to the first program;
and when the target time precision is determined not to belong to the time precision, executing the step of judging whether the target time precision is higher than the first time precision.
4. The method according to claim 2, wherein when it is determined that the target time accuracy is not higher than the first time accuracy, the method further comprises:
scheduling the target program to a second processor, wherein the second processor belongs to the second class of processors;
based on the second processor, calling the kernel high-precision sleep function corresponding to the second processor to enable the target program to run on the second processor, and sleeping based on a third time precision set by the kernel high-precision sleep function, a second clock event device bound by the second processor and the target time precision.
5. The method of claim 2, wherein after the step of updating the bound second clock event device set for each processor in the first class of processors to the first clock event device, the configuration process further comprises:
associating each processor in the first class of processors with a preset high-precision sleep function;
the step of scheduling the target program to a first processor includes:
and calling the preset high-precision sleep function, and scheduling the target program to a first processor.
6. The method of claim 1, wherein when the first magnitude is determined to be different from the second magnitude, the method further comprises:
converting the target time precision from the first order of magnitude to the second order of magnitude;
and calling the kernel high-precision sleep function corresponding to the first processor.
7. A programmed sleep time control apparatus, the apparatus comprising:
the system comprises an obtaining module, a processing module and a processing module, wherein the obtaining module is used for obtaining a target program based on a kernel of a target operating system, and the target program carries target time precision;
the judging module is used for judging whether the target time precision is higher than first time precision or not;
a first scheduling module, configured to schedule the target program to a first processor when it is determined that the target time precision is higher than the first time precision, where the first processor belongs to a first class of processors to which a first clock event device is bound, and the first clock event device is: clock event equipment supporting high-precision time precision;
a first calling module, configured to call, based on the first processor, a kernel high-precision sleep function corresponding to the first processor, so that the target program runs on the first processor, and perform sleep based on a second time precision of the kernel high-precision sleep function, a first clock event device bound to the first processor, and the target time precision;
the first calling module comprises a third determining unit, a judging unit and a first calling unit;
the third determining unit is configured to determine, based on the first processor, the kernel high-precision sleep function corresponding to the first processor;
the judging unit is used for judging whether a first order of magnitude of the target time precision is the same as a second order of magnitude corresponding to the kernel high-precision sleep function or not;
the first calling unit is configured to call the kernel high-precision sleep function corresponding to the first processor when it is determined that the first order of magnitude is the same as the second order of magnitude.
8. The apparatus of claim 7, further comprising a configuration module that configures a kernel of the target operating system, wherein the configuration module comprises a start unit, a call unit, a first determination unit, a setting unit, a second determination unit, and a registration setting unit;
the starting unit is used for starting the high-precision clock configuration of the kernel of the target operating system before the kernel of the target operating system obtains the target program;
the calling unit is used for calling the kernel high-precision sleep function corresponding to the high-precision clock configuration corresponding to at least two processors corresponding to the target operating system based on the started high-precision clock configuration;
the first determining unit is configured to determine each processor set as a second type of processor according to preset setting information and an identifier of each processor of the at least two processors;
the setting unit is configured to set a second time precision of the kernel high-precision sleep function corresponding to each of the second type of processors to a third time precision, where the third time precision is not higher than the first time precision, and each of the second type of processors has bound thereto a second clock event device, where the second clock event device is: a clock event device supporting low precision time precision;
the second determining unit is used for starting the kernel of the target operating system and determining a high-precision clock;
the register setting unit is configured to register the determined high-precision clock as the first clock event device into a kernel of the target operating system, and update a second clock event device, which is set to be bound by each processor in a first class of processors, as the first clock event device, where the second class of processors is: a processor of the at least two processors other than the first type of processor.
9. The apparatus of claim 8, wherein the configuration module further comprises a binding unit;
the binding unit is used for binding a first program related to a target peripheral to any one of the second type of processors after the second time precision of the kernel high-precision sleep function corresponding to each processor in the second type of processors is set to be a third time precision;
the apparatus also includes a determination module;
the determining module is configured to determine whether the target program belongs to the first program before the determining whether the target time accuracy is higher than a first time accuracy; and when the judgment module is determined not to belong to the network, triggering the judgment module.
10. The apparatus of claim 8, further comprising a second scheduling module and a second calling module;
the second scheduling module is configured to schedule the target program to a second processor when it is determined that the target time precision is not higher than the first time precision, where the second processor belongs to the second class of processors;
the second calling module is configured to call, based on the second processor, the kernel high-precision sleep function corresponding to the second processor, so that the target program runs on the second processor, and perform sleep based on a third time precision set by the kernel high-precision sleep function, the second clock event device bound to the second processor, and the target time precision.
11. The apparatus of claim 8, wherein the configuration module further comprises an association unit;
the association unit is configured to associate each of the first type of processors with a preset high-precision sleep function after the second clock event device bound to each of the first type of processors is updated to the first clock event device;
the first scheduling module is specifically configured to
And calling the preset high-precision sleep function, and scheduling the target program to a first processor.
12. The apparatus of claim 7, wherein the first calling module further comprises a conversion unit and a second calling unit;
the conversion unit is used for converting the target time precision from the first order of magnitude to the second order of magnitude when the first order of magnitude is judged to be different from the second order of magnitude;
the second calling unit is used for calling the kernel high-precision sleep function corresponding to the first processor.
13. An electronic device is characterized by comprising a plurality of processors, a communication interface, a memory and a communication bus, wherein the plurality of processors and the communication interface are used for realizing the communication among the memories through the communication bus;
a memory for storing a computer program;
a processor for implementing the sleep time control method according to any one of claims 1 to 6 when executing the computer program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which when executed by a processor implements a sleep time control method of the program of any one of claims 1 to 6.
CN201710418542.4A 2017-06-06 2017-06-06 Program sleep time control method and device Active CN109002325B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710418542.4A CN109002325B (en) 2017-06-06 2017-06-06 Program sleep time control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710418542.4A CN109002325B (en) 2017-06-06 2017-06-06 Program sleep time control method and device

Publications (2)

Publication Number Publication Date
CN109002325A CN109002325A (en) 2018-12-14
CN109002325B true CN109002325B (en) 2021-04-30

Family

ID=64572827

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710418542.4A Active CN109002325B (en) 2017-06-06 2017-06-06 Program sleep time control method and device

Country Status (1)

Country Link
CN (1) CN109002325B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112579249A (en) * 2019-09-30 2021-03-30 奇安信安全技术(珠海)有限公司 Multi-CPU virtual machine operation method and device, storage medium and computer equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022669A (en) * 2015-06-30 2015-11-04 惠州市亿能电子有限公司 Method for improving BMS system performance by coprocessor
CN105700961B (en) * 2016-02-29 2019-03-08 华为技术有限公司 Business container creation method and device

Also Published As

Publication number Publication date
CN109002325A (en) 2018-12-14

Similar Documents

Publication Publication Date Title
US10713091B2 (en) Streaming program execution method of intelligent terminal
US20170329632A1 (en) Device scheduling method, task manager and storage medium
JP2014520346A5 (en)
CN109981737B (en) Network request processing method, device, terminal and storage medium
CN105528257B (en) Single-process data processing method and device
US20180157557A1 (en) Determining reboot time after system update
CN115361451B (en) Network communication parallel processing method and system
CN109002325B (en) Program sleep time control method and device
CN113886069A (en) Resource allocation method and device, electronic equipment and storage medium
CN109561134B (en) Electronic device, distributed cluster service distribution method and storage medium
CN108509264B (en) Overtime task scheduling system and method
US9251107B2 (en) Immediate direct memory access descriptor-based write operation
CN112965755B (en) Initialization method and device of multi-core processor, electronic equipment and storage medium
CN104303150B (en) Method for managing the task execution in computer system
JP2002288104A (en) Computer system, and method and program for its resource assigning
WO2019029721A1 (en) Task scheduling method, apparatus and device, and storage medium
CN109445698B (en) Method and device for querying multi-chip flash state and computer readable storage medium
CN104079540A (en) Method, device and system of updating application as well as user equipment
WO2014101892A1 (en) Resource adjustment method and device
CN106844036B (en) Physical equipment access method and device
CN115809128A (en) Multi-core task scheduling method and system applied to automobile ECU
CN113032128B (en) Multi-task control method and device, electronic equipment and storage medium
JPWO2006001051A1 (en) Multiprocessor device and control method thereof
CN114090088A (en) Multi-operating-system starting method and device
CN113608845A (en) Data processing method and device

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